Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
test: use AZURE_CORE_ONLY_SHOW_ERRORS when running E2E (#4288)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackfrancis authored Feb 20, 2021
1 parent 94fbc0b commit a9e0e3b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
1 change: 1 addition & 0 deletions .pipelines/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ steps:
export CLIENT_ID=$(SERVICE_PRINCIPAL_CLIENT_ID_E2E_KUBERNETES)
export CLIENT_SECRET=$(SERVICE_PRINCIPAL_CLIENT_SECRET_E2E_KUBERNETES)
export CLIENT_OBJECTID=$(SERVICE_PRINCIPAL_OBJECT_ID_E2E_KUBERNETES)
export AZURE_CORE_ONLY_SHOW_ERRORS=True
make test-kubernetes
displayName: ginkgo k8s e2e tests
- task: PublishPipelineArtifact@0
Expand Down
1 change: 1 addition & 0 deletions .pipelines/pr-windows-signed-scripts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
-e TENANT_ID=${TENANT_ID} \
-e WINDOWS_PROVISIONING_SCRIPTS_URL=${SCRIPT_PACKAGE_URL} \
-e USE_MANAGED_IDENTITY="false" \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEIS_GO_DEV_IMAGE} make test-kubernetes
displayName: Run e2e tests
condition: succeeded()
Expand Down
1 change: 1 addition & 0 deletions .pipelines/vhd-builder-windows-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
-e WINDOWS_NODE_VHD_URL=${OS_DISK_URI} \
-e USE_MANAGED_IDENTITY="false" \
-e CONTAINER_RUNTIME=${{ parameters.containerRuntime }} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEIS_GO_DEV_IMAGE} make test-kubernetes
displayName: run e2e tests
condition: and(succeeded(), eq(variables.COPY_VHD, 'False'))
Expand Down
6 changes: 6 additions & 0 deletions test/e2e/cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ docker run --rm \
-e CUSTOM_KUBE_SCHEDULER_IMAGE=${CUSTOM_KUBE_SCHEDULER_IMAGE} \
-e CUSTOM_KUBE_CONTROLLER_MANAGER_IMAGE=${CUSTOM_KUBE_CONTROLLER_MANAGER_IMAGE} \
-e CUSTOM_WINDOWS_PACKAGE_URL=${CUSTOM_WINDOWS_PACKAGE_URL} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
"${DEV_IMAGE}" make test-kubernetes || tryExit && renameResultsFile "deploy"

if [ "${UPGRADE_CLUSTER}" = "true" ] || [ "${SCALE_CLUSTER}" = "true" ] || [ -n "$ADD_NODE_POOL_INPUT" ] || [ "${GET_CLUSTER_LOGS}" = "true" ] || [ "${ROTATE_CERTS}" = "true" ]; then
Expand Down Expand Up @@ -360,6 +361,7 @@ if [ "${ROTATE_CERTS}" = "true" ]; then
-e ARC_SUBSCRIPTION_ID=${ARC_SUBSCRIPTION_ID:-$AZURE_SUBSCRIPTION_ID} \
-e ARC_LOCATION=${ARC_LOCATION:-$LOCATION} \
-e ARC_TENANT_ID=${ARC_TENANT_ID:-$AZURE_TENANT_ID} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEV_IMAGE} make test-kubernetes || tryExit && renameResultsFile "rotate-certs"
fi

Expand Down Expand Up @@ -440,6 +442,7 @@ if [ -n "$ADD_NODE_POOL_INPUT" ]; then
-e ARC_SUBSCRIPTION_ID=${ARC_SUBSCRIPTION_ID:-$AZURE_SUBSCRIPTION_ID} \
-e ARC_LOCATION=${ARC_LOCATION:-$LOCATION} \
-e ARC_TENANT_ID=${ARC_TENANT_ID:-$AZURE_TENANT_ID} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEV_IMAGE} make test-kubernetes || tryExit && renameResultsFile "add-node-pool"
fi

Expand Down Expand Up @@ -554,6 +557,7 @@ if [ "${SCALE_CLUSTER}" = "true" ]; then
-e ARC_SUBSCRIPTION_ID=${ARC_SUBSCRIPTION_ID:-$AZURE_SUBSCRIPTION_ID} \
-e ARC_LOCATION=${ARC_LOCATION:-$LOCATION} \
-e ARC_TENANT_ID=${ARC_TENANT_ID:-$AZURE_TENANT_ID} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEV_IMAGE} make test-kubernetes || tryExit && renameResultsFile "scale-down"
fi

Expand Down Expand Up @@ -643,6 +647,7 @@ if [ "${UPGRADE_CLUSTER}" = "true" ]; then
-e ARC_SUBSCRIPTION_ID=${ARC_SUBSCRIPTION_ID:-$AZURE_SUBSCRIPTION_ID} \
-e ARC_LOCATION=${ARC_LOCATION:-$LOCATION} \
-e ARC_TENANT_ID=${ARC_TENANT_ID:-$AZURE_TENANT_ID} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEV_IMAGE} make test-kubernetes || tryExit && renameResultsFile "upgrade"
done
fi
Expand Down Expand Up @@ -721,5 +726,6 @@ if [ "${SCALE_CLUSTER}" = "true" ]; then
-e ARC_SUBSCRIPTION_ID=${ARC_SUBSCRIPTION_ID:-$AZURE_SUBSCRIPTION_ID} \
-e ARC_LOCATION=${ARC_LOCATION:-$LOCATION} \
-e ARC_TENANT_ID=${ARC_TENANT_ID:-$AZURE_TENANT_ID} \
-e AZURE_CORE_ONLY_SHOW_ERRORS="True" \
${DEV_IMAGE} make test-kubernetes || tryExit && renameResultsFile "scale-up"
fi
5 changes: 5 additions & 0 deletions test/e2e/engine/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type Config struct {
ArcSubscriptionID string `envconfig:"ARC_SUBSCRIPTION_ID" default:""`
ArcLocation string `envconfig:"ARC_LOCATION" default:""`
ArcTenantID string `envconfig:"ARC_TENANT_ID" default:""`
RunVMSSNodePrototype bool `envconfig:"RUN_VMSS_NODE_PROTOTYPE" default:"false"`

ClusterDefinitionPath string // The original template we want to use to build the cluster from.
ClusterDefinitionTemplate string // This is the template after we splice in the environment variables
Expand Down Expand Up @@ -180,6 +181,10 @@ func Build(cfg *config.Config, masterSubnetID string, agentSubnetIDs []string, i
prop.OrchestratorProfile.KubernetesConfig.PrivateCluster.JumpboxProfile.PublicKey = config.PublicSSHKey
}
}
if config.RunVMSSNodePrototype {
// In order to better determine the time it takes for nodes to come online let's eliminate any VM reboot considerations
prop.LinuxProfile.RunUnattendedUpgradesOnBootstrap = to.BoolPtr((false))
}
}

if config.KubernetesImageBase != "" {
Expand Down
6 changes: 2 additions & 4 deletions test/e2e/kubernetes/kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2799,9 +2799,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
if cfg.RunVMSSNodePrototype {
if eng.ExpandedDefinition.Properties.HasVMSSAgentPool() {
By("Installing kured with node annotations configuration")
cmd := exec.Command("k", "apply", "-f", filepath.Join(WorkloadDir, "kured-annotations.yaml"))
util.PrintCommand(cmd)
_, err := cmd.CombinedOutput()
_, err := daemonset.CreateDaemonsetFromFileWithRetry(filepath.Join(WorkloadDir, "kured-annotations.yaml"), "kured", "kube-system", 5*time.Second, cfg.Timeout)
Expect(err).NotTo(HaveOccurred())
nodes, err := node.GetReadyWithRetry(1*time.Second, cfg.Timeout)
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -2901,7 +2899,7 @@ var _ = Describe("Azure Container Cluster using the Kubernetes Orchestrator", fu
timeToLargeContainerDaemonsetRunningBaseline = time.Since(start)
log.Printf("Took %s for large-container-daemonset pod to reach Running state on new node\n", timeToLargeContainerDaemonsetRunningBaseline)
}
cmd = exec.Command("helm", "status", "vmss-prototype")
cmd := exec.Command("helm", "status", "vmss-prototype")
out, err := cmd.CombinedOutput()
if err == nil {
By("Found pre-existing 'vmss-prototype' helm release, deleting it...")
Expand Down

0 comments on commit a9e0e3b

Please sign in to comment.