Repository: Azure/ARO-RP
Pull request #1975 (2022-02-22 03:03:20)

add additional logging to redeploy vm e2e

### Which issue this PR addresses:

<!--
Please include a link to the ADO work item as well as any GitHub issues.

Usage: `Fixes #<GitHub issue number>`, or `Fixes (paste link of issue)`.
-->
more logging for redeploy vm e2e. doesn't fix anything, but at least adds some more info for when this test fails.

### What this PR does / why we need it:
adds additional logging to redeploy vm e2e to better understand state when this job fails

<!--
Include a brief summary of what the PR is intended to accomplish and how the PR
does it. (2-3 sentences)
-->

### Test plan for issue:
n/a
<!--
How did you test that this PR works?

- Are there unit tests?
- Are there integration/e2e tests?
- If it is not possible to write automated tests, explain why and document how
  to manually test and verify the feature.
-->

### Is there any documentation that needs to be updated for this PR?
n/a
<!--
- If yes and the docs are in GitHub, include doc updates in the PR.
- If yes and the docs are not in GitHub (i.e. ADO wiki), include a link to the
  docs.
- If no, explain why (e.g. "tech debt cleanup, N/A").
-->



Patch:
diff --git a/.pipelines/prod-release-tag.yml b/.pipelines/prod-release-tag.yml
index bb9f2baf6..0e36b9e6b 100644
--- a/.pipelines/prod-release-tag.yml
+++ b/.pipelines/prod-release-tag.yml
@@ -80,6 +80,7 @@ stages:
       - southcentralus
       - westus
       - westus2
+      - westus3
       configFileName: prod-config.yaml
       azureDevOpsJSONSPN: $(aro-v4-ci-devops-spn)
       vsoProjectID: $(vso-project-id)
diff --git a/.pipelines/prod-release.yml b/.pipelines/prod-release.yml
index e1aacd527..687f815e2 100644
--- a/.pipelines/prod-release.yml
+++ b/.pipelines/prod-release.yml
@@ -76,6 +76,7 @@ stages:
       - southcentralus
       - westus
       - westus2
+      - westus3
       configFileName: prod-config.yaml
       configVersion: ${{ parameters.configVersion }}
       azureDevOpsJSONSPN: $(aro-v4-ci-devops-spn)


Test patch:
diff --git a/.pipelines/e2e-with-billing-all-regions.yml b/.pipelines/e2e-with-billing-all-regions.yml
index d6cd44400..14dfde24b 100644
--- a/.pipelines/e2e-with-billing-all-regions.yml
+++ b/.pipelines/e2e-with-billing-all-regions.yml
@@ -68,6 +68,7 @@ stages:
     - southcentralus
     - westus
     - westus2
+    - westus3
 - stage: PhaseThree
   displayName: wait 2 hours to avoid resource threshold
   dependsOn: []
diff --git a/test/e2e/adminapi_redeployvm.go b/test/e2e/adminapi_redeployvm.go
index d9d7762b7..df35a2f24 100644
--- a/test/e2e/adminapi_redeployvm.go
+++ b/test/e2e/adminapi_redeployvm.go
@@ -36,6 +36,7 @@ var _ = Describe("[Admin API] VM redeploy action", func() {
 		Expect(err).NotTo(HaveOccurred())
 		Expect(vms).NotTo(HaveLen(0))
 		vm := vms[0]
+		log.Infof("selected vm: %s", *vm.Name)
 
 		By("triggering the redeploy action")
 		clockDrift := -1 * time.Minute
@@ -67,19 +68,18 @@ var _ = Describe("[Admin API] VM redeploy action", func() {
 			var nodeNotReady, rebooted, nodeReady bool
 
 			for _, event := range events.Items {
-				if event.CreationTimestamp.After(nodeKillTime.Time) {
-					if !nodeNotReady &&
-						event.Reason == "NodeNotReady" &&
-						event.Regarding.Name == *vm.Name {
+				if event.CreationTimestamp.After(nodeKillTime.Time) && event.Regarding.Name == *vm.Name {
+					if !nodeNotReady && event.Reason == "NodeNotReady" {
 						nodeNotReady = true
-					} else if !rebooted &&
-						event.Reason == "Rebooted" &&
-						event.Regarding.Name == *vm.Name {
+						log.Info("node entered not ready state")
+					}
+					if !rebooted && event.Reason == "Rebooted" {
 						rebooted = true
-					} else if !nodeReady &&
-						event.Reason == "NodeReady" &&
-						event.Regarding.Name == *vm.Name {
+						log.Info("node reboooted")
+					}
+					if !nodeReady && event.Reason == "NodeReady" {
 						nodeReady = true
+						log.Info("node returned to ready state")
 						break
 					}
 				}