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 1912820: competing connectivitycheckcontrollers cause pod restarts during upgrades #987

Conversation

sanchezl
Copy link
Contributor

@sanchezl sanchezl commented Feb 3, 2021

No description provided.

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 3, 2021
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
@sanchezl sanchezl force-pushed the connectivitycheckcontroller-upgrade branch from 7198ada to 7321795 Compare February 4, 2021 02:36
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
@sanchezl sanchezl force-pushed the connectivitycheckcontroller-upgrade branch from 7321795 to 1ae9777 Compare February 4, 2021 03:41
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
Comment on lines 129 to 130
// upgrade is in progress if there is no history, or the latest history entry matches the desired version and is completed
if len(history) == 0 || !(history[0].Version == desired && history[0].State == configv1.CompletedUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// upgrade is in progress if there is no history, or the latest history entry matches the desired version and is completed
if len(history) == 0 || !(history[0].Version == desired && history[0].State == configv1.CompletedUpdate) {
// upgrade is in progress if there is no history, or the latest history entry matches the desired version and is not completed
if len(history) == 0 || !(history[0].Version == desired && history[0].State == configv1.CompletedUpdate) {

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@sanchezl sanchezl force-pushed the connectivitycheckcontroller-upgrade branch from 1ae9777 to b7ad411 Compare February 4, 2021 14:21
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
desired := clusterVersion.Status.Desired.Version
history := clusterVersion.Status.History
// upgrade is in progress if there is no history, or the latest history entry matches the desired version and is not completed
if len(history) == 0 || !(history[0].Version == desired && history[0].State != configv1.CompletedUpdate) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you sure this logic is correct? I expected (and have easier time reading)

if len(history) == 0{
  klog.V(1).Infof("ConnectivityCheckController is waiting for transition to first desired version (%s) to be completed.", desired)
  return nil
}
if history[0].Version != desired{
  klog.V(1).Infof("ConnectivityCheckController is waiting for transition to desired version (%s) to be started.", desired)
  return nil
}

// this one looks different from what you wrote above....
if history[0].State != configv1.CompletedUpdate{
  klog.V(1).Infof("ConnectivityCheckController is waiting for transition to desired version (%s) to be completed.", desired)
  return 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.

Yes, I had a == that should of been a != there. I'll split it out as per your suggestion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 4, 2021
@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2021
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-network-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 4, 2021
@deads2k
Copy link
Contributor

deads2k commented Feb 5, 2021

/lgtm

release the hold when you're confident your proof works.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, sanchezl

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

@sanchezl sanchezl changed the title pause connectivitycheckcontroller during upgrades Bug 1912820: competing connectivitycheckcontrollers cause pod restarts during upgrades Feb 5, 2021
@openshift-ci-robot
Copy link

@sanchezl: This pull request references Bugzilla bug 1912820, which is valid. 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 POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1912820: competing connectivitycheckcontrollers cause pod restarts during upgrades

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 bugzilla/severity-medium Referenced Bugzilla bug's severity is medium 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. labels Feb 5, 2021
@sanchezl
Copy link
Contributor Author

sanchezl commented Feb 5, 2021

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 5, 2021
@openshift-merge-robot openshift-merge-robot merged commit 9eb0d97 into openshift:master Feb 5, 2021
@openshift-ci-robot
Copy link

@sanchezl: Some pull requests linked via external trackers have merged:

The following pull requests linked via external trackers have not merged:

These pull request must merge or be unlinked from the Bugzilla bug in order for it to move to the next state. Once unlinked, request a bug refresh with /bugzilla refresh.

Bugzilla bug 1912820 has not been moved to the MODIFIED state.

In response to this:

Bug 1912820: competing connectivitycheckcontrollers cause pod restarts during upgrades

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.

sanchezl added a commit to sanchezl/cluster-openshift-apiserver-operator that referenced this pull request Feb 5, 2021
sanchezl added a commit to sanchezl/cluster-kube-apiserver-operator that referenced this pull request Feb 5, 2021
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/cluster-kube-apiserver-operator that referenced this pull request Feb 10, 2021
sanchezl added a commit to openshift-cherrypick-robot/cluster-kube-apiserver-operator that referenced this pull request Apr 7, 2021
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/cluster-openshift-apiserver-operator that referenced this pull request Apr 7, 2021
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/cluster-network-operator that referenced this pull request Apr 7, 2021
openshift-cherrypick-robot pushed a commit to openshift-cherrypick-robot/cluster-network-operator that referenced this pull request Apr 7, 2021
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-medium Referenced Bugzilla bug's severity is medium 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