Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1908891: test/e2e: Block on TestCoreDNSImageUpgrade image revert #226

Merged
merged 1 commit into from Jan 5, 2021

Conversation

sgreene570
Copy link
Contributor

@sgreene570 sgreene570 commented Dec 18, 2020

Block on TestCoreDNSImageUpgrade image revert

TestCoreDNSImageUpgrade: Ensure that the CoreDNS image change for default DNS is completely reverted before moving onto the next test.

TestDNSForwarding: Ensure that DNS pods are all available before verifying Corefile contents from each DNS pod. Also, log pod status if a given pod's Corefile doesn't meet the test's expectations.

This commit enhances the DNS operator tests to resolve BZ#1908891, in which TestDNSForwarding is noted as very flakey due to TestDNSForwarding's image revert rollout not blocking the premature execution of TestDNSFowarding.

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Dec 18, 2020
@openshift-ci-robot
Copy link
Contributor

@sgreene570: This pull request references Bugzilla bug 1908891, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1908891: test/e2e: Block on TestCoreDNSImageUpgrade image revert

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 18, 2020
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 18, 2020
@openshift-ci-robot
Copy link
Contributor

@sgreene570: This pull request references Bugzilla bug 1908891, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1908891: test/e2e: Block on TestCoreDNSImageUpgrade image revert

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Comment on lines 263 to 273
for _, pod := range podList.Items {
for _, container := range pod.Spec.Containers {
if container.Name == "dns" {
if container.Image == expectedImage {
return true, nil
}
break
}
}
}
return false, nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to verify that every pod has the expected image, but it looks like this logic only makes sure that some pod does. We need to invert the logic as follows:

Suggested change
for _, pod := range podList.Items {
for _, container := range pod.Spec.Containers {
if container.Name == "dns" {
if container.Image == expectedImage {
return true, nil
}
break
}
}
}
return false, nil
for _, pod := range podList.Items {
for _, container := range pod.Spec.Containers {
if container.Name == "dns" {
if container.Image != expectedImage {
return false, nil
}
break
}
}
}
return true, nil

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, nice catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@Miciah
Copy link
Contributor

Miciah commented Dec 18, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2020
@Miciah
Copy link
Contributor

Miciah commented Dec 18, 2020

It worked! It's failing on TestCoreDNSImageUpgrade instead of TestDNSForwarding now. * grin *.

@Miciah
Copy link
Contributor

Miciah commented Dec 18, 2020

Maybe need to increase the timeout in TestCoreDNSImageUpgrade.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Dec 18, 2020
@sgreene570
Copy link
Contributor Author

bumped the timeout in checkCurrentDNSImage to 7 minutes (~1 min per node in a 6 node cluster). Hopefully that works out.

@sgreene570
Copy link
Contributor Author

/retest

@Miciah
Copy link
Contributor

Miciah commented Dec 21, 2020

/test e2e-aws-operator

@sgreene570
Copy link
Contributor Author

@Miciah For the operator e2e test, could it be the case that the cluster version operator is reverting changes made to the CoreDNS Image env variable by the operator test's setImage function, thus never allowing all pods in the daemonset to rollout with the desired image? Do we need to rethink the TestCoreDNSImageUpgrade test (Im assuming we dont want to broadly disable the CVO during our operator tests)?

@Miciah
Copy link
Contributor

Miciah commented Jan 4, 2021

@Miciah For the operator e2e test, could it be the case that the cluster version operator is reverting changes made to the CoreDNS Image env variable by the operator test's setImage function, thus never allowing all pods in the daemonset to rollout with the desired image? Do we need to rethink the TestCoreDNSImageUpgrade test (Im assuming we dont want to broadly disable the CVO during our operator tests)?

I think you're right, and the test needs fundamental changes. For now, I'd suggest adding t.Skip to the test. Long-term, we can either add an override on the clusterversion or refactor the test to limit the scope of what is tested or use mocks.

TestCoreDNSImageUpgrade: Ensure that the CoreDNS image change
for default DNS is completely reverted before moving onto the next test.

TestDNSForwarding: Ensure that DNS pods are all available
before verifying Corefile contents from each DNS pod. Also,
log pod status if a given pod's Corefile doesn't meet the test's
expectations.

This commit enhances the DNS operator tests to resolve
BZ#1908891, in which TestDNSForwarding is noted as
very flakey due to TestDNSForwarding's image revert rollout
not blocking the premature execution of TestDNSFowarding.
@sgreene570
Copy link
Contributor Author

For now, I'd suggest adding t.Skip to the test.

Done. I also created a bugzilla to track this fix (and mentioned it in code comments above the skip statement).

@Miciah
Copy link
Contributor

Miciah commented Jan 4, 2021

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 4, 2021
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Miciah, sgreene570

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@sgreene570
Copy link
Contributor Author

/test e2e-upgrade

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@sgreene570
Copy link
Contributor Author

/retest
/refresh

@openshift-ci-robot
Copy link
Contributor

@sgreene570: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-upgrade 2b2d36b link /test e2e-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 3ab7166 into openshift:master Jan 5, 2021
@openshift-ci-robot
Copy link
Contributor

@sgreene570: All pull requests linked via external trackers have merged:

Bugzilla bug 1908891 has been moved to the MODIFIED state.

In response to this:

Bug 1908891: test/e2e: Block on TestCoreDNSImageUpgrade image revert

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants