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 1830390: pkg/operator: clear Degraded on task's success #1598

Merged
merged 1 commit into from Apr 3, 2020

Conversation

runcom
Copy link
Member

@runcom runcom commented Mar 31, 2020

The MCO runs a bunch of sync functions during its sync. Each of these functions has
a name (a task name). When we loop through the sync functions and fail on any of them,
the MCO breaks and reports the Degraded status for that task as Reason: TaskNameFailed.
It then goes and retries all the sync functions (no change in behavior till here).
During some debugging and testing I've noticed that the RenderConfig task failed with the
version mismatch error for osImageURL. That is good, and also right. The MCO went ahead
and set the Degraded condition to RenderConfigFailed (correctly!). The MCO then went again
and re-tried all the sync functions. Now the RenderConfig task succeeded (the version mismatch error
can indeed be temporary). What happened from now on is that the MCO kept rolling and eventually finishes
the upgrade I was running but the RenderConfigFailed Degraded status was never cleared back to False
even if the task did succeed (I had to wait for all the sync functions to finish as expected, and it takes a while still reporting degraded).
This patch introduces a new function which we call after every sync function in order to clear
any previous degraded status when it instead succeeded in later syncs.

Signed-off-by: Antonio Murdaca runcom@linux.com

The MCO runs a bunch of sync functions during its sync. Each of these functions have
a name (a task name). When we loop through the sync functions and fail on any of them,
the MCO breaks and reports the Degraded status for that task as Reason: TaskNameFailed.
It then goes and retry all the sync functions (no change in behavior till here).
During some debugging and testing I've noticed that the RenderConfig task failed with the
version mismatch error for osImageURL. That is good, and also right. The MCO went ahead
and set the Degraded condition to RenderConfigFailed (correctly!). The MCO then went again
and re-tried all the sync functions. Now the RenderConfig task succeeded (the version mismatch error
can indeed be temporary). What happened from now on is that the MCO kept rolling and eventually finishes
the upgrade I was running but the RenderConfigFailed Degraded status was never cleared back to False
even if the task _did_ succeed.
This patch introduces a new function which we call after every sync function in order to clear
any previous degraded status when it instaed succeeded on later syncs.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 31, 2020
@runcom
Copy link
Member Author

runcom commented Apr 1, 2020

/retest

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 1, 2020

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

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 3a7af74 link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@runcom
Copy link
Member Author

runcom commented Apr 1, 2020

/skip

@sinnykumari
Copy link
Contributor

looks sane, will let other MCO folks for second opinion
/approve

return nil
}
if degradedStatusCondition.Reason != task+"Failed" {
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

is there anyway a legit degraded message will not have Failed at the end?

Copy link
Contributor

Choose a reason for hiding this comment

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

would it be better to just check that task is contained in Reason? (I dunno, I'm wondering?)

Copy link
Member Author

Choose a reason for hiding this comment

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

We can only clear out Degraded conditions coming from TaskName+Failed as we standardize that naming. The other errors cannot be realistically cleared here - maybe I can tackle that next but I'm not optimistic in general, this will make the trick for conditions we know about for now

Copy link
Contributor

Choose a reason for hiding this comment

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

Gotcha! Thanks for explaining =)

@kikisdeliveryservice
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kikisdeliveryservice, runcom, sinnykumari

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:
  • OWNERS [kikisdeliveryservice,runcom,sinnykumari]

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

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 3, 2020
@openshift-merge-robot openshift-merge-robot merged commit 2fae9fc into openshift:master Apr 3, 2020
@runcom runcom deleted the clear-degraded branch April 4, 2020 11:30
@kikisdeliveryservice kikisdeliveryservice changed the title pkg/operator: clear Degraded on task's success Bug 1830390: pkg/operator: clear Degraded on task's success May 20, 2020
@openshift-ci-robot
Copy link
Contributor

@runcom: All pull requests linked via external trackers have merged: . Bugzilla bug 1830390 has been moved to the MODIFIED state.

In response to this:

Bug 1830390: pkg/operator: clear Degraded on task's success

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. 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