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 1948012: Report the operator status as always upgradeable in serviceCA/cluster #154

Merged
merged 1 commit into from
May 25, 2021

Conversation

mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Apr 10, 2021

... and this will also, via library-go/pkg/operator/status, show up in ClusterOperators/service-ca , which was previously reporting the default upgradeable Statu: Unknown, Reason: NoData.

https://bugzilla.redhat.com/show_bug.cgi?id=1948012

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. bugzilla/severity-medium Referenced Bugzilla bug's severity is medium for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Apr 10, 2021
@openshift-ci-robot
Copy link
Contributor

@mtrmac: This pull request references Bugzilla bug 1948012, which is invalid:

  • expected the bug to target the "4.8.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1948012: Report the operator status as always upgradeable in serviceCA/cluster

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
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mtrmac
To complete the pull request process, please assign sttts after the PR has been reviewed.
You can assign the PR to them by writing /assign @sttts in a comment when ready.

The full list of commands accepted by this bot can be found 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

@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 10, 2021

/test all

@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 10, 2021

This trivial implementation is similar to several other operators, and consistent with actual operator behavior (which never stops trying to update the operands).

It might make sense to use library-go/pkg/operator/unsupportedconfigoverridescontroller to block upgrades on unsupported overrides; let me know if I should add that.

@mtrmac mtrmac marked this pull request as ready for review April 10, 2021 13:31
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 10, 2021
@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 10, 2021

Note: openshift/origin#26030 should be partially dropped after this merges.

@wking
Copy link
Member

wking commented Apr 10, 2021

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Apr 10, 2021
@openshift-ci-robot
Copy link
Contributor

@wking: This pull request references Bugzilla bug 1948012, which is valid. The bug has been moved to the POST state.

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

Requesting review from QA contact:
/cc @barleyer

In response to this:

/bugzilla refresh

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.

func setUpgradeableTrue(operatorConfig *operatorv1.ServiceCA) {
v1helpers.SetOperatorCondition(&operatorConfig.Status.Conditions, operatorv1.OperatorCondition{
Type: operatorv1.OperatorStatusTypeUpgradeable,
Status: operatorv1.ConditionTrue,
Copy link
Member

Choose a reason for hiding this comment

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

Can we set Reason: "AsExpected" or some such, because it makes it easier to distinguish between "we're happy" and "oops, we forgot to explain why we were sad" in Telemetry like count by (name,reason) (cluster_operator_conditions)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated. I couldn’t find a Go constant for "AsExpected", using a string like library-go and others.

Copy link
Member

Choose a reason for hiding this comment

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

hmm, you pass reason into setUpgradeableTrue now (good), but I don't see you actually passing it through to SetOperatorCondition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, stupid of me. Thanks, hopefully fixed, and I’ll actually test this in practice to confirm this time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

managementState: Managed:

$ oc get serviceca/cluster -o yaml

status:
  conditions:
  - lastTransitionTime: "2021-04-14T11:36:15Z"
    reason: OperatorSyncLoopComplete
    status: "False"
    type: Degraded
  - lastTransitionTime: "2021-04-14T11:44:51Z"
    message: All service-ca-operator deployments updated
    reason: ManagedDeploymentsCompleteAndUpdated
    status: "False"
    type: Progressing
  - lastTransitionTime: "2021-04-14T11:44:43Z"
    reason: ManagedDeploymentsCompleteAndUpdated
    status: "True"
    type: Available
  - lastTransitionTime: "2021-04-14T11:36:15Z"
    reason: AsExpected
    status: "True"
    type: Upgradeable
  - lastTransitionTime: "2021-04-14T11:36:17Z"
    status: "False"
    type: ResourceSyncControllerDegraded

$ oc get clusteroperators/service-ca -o yaml

status:
  conditions:
  - lastTransitionTime: "2021-04-14T11:36:10Z"
    message: All is well
    reason: AsExpected
    status: "False"
    type: Degraded
  - lastTransitionTime: "2021-04-14T11:44:51Z"
    message: 'Progressing: All service-ca-operator deployments updated'
    reason: AsExpected
    status: "False"
    type: Progressing
  - lastTransitionTime: "2021-04-14T11:36:15Z"
    message: All is well
    reason: AsExpected
    status: "True"
    type: Available
  - lastTransitionTime: "2021-04-14T11:36:15Z"
    message: All is well
    reason: AsExpected
    status: "True"
    type: Upgradeable

and managementState: Unmanaged:

$ oc get serviceca/cluster -o yaml

status:
  conditions:
  - lastTransitionTime: "2021-04-14T11:36:15Z"
    reason: OperatorSyncLoopComplete
    status: "False"
    type: Degraded
  - lastTransitionTime: "2021-04-14T11:44:51Z"
    message: All service-ca-operator deployments updated
    reason: ManagedDeploymentsCompleteAndUpdated
    status: "False"
    type: Progressing
  - lastTransitionTime: "2021-04-14T11:44:43Z"
    reason: ManagedDeploymentsCompleteAndUpdated
    status: "True"
    type: Available
  - lastTransitionTime: "2021-04-14T11:36:15Z"
    reason: AsExpected
    status: "True"
    type: Upgradeable
  - lastTransitionTime: "2021-04-14T11:36:17Z"
    status: "False"
    type: ResourceSyncControllerDegraded

$ oc get clusteroperators/service-ca -o yaml

status:
  conditions:
  - lastTransitionTime: "2021-04-14T12:03:47Z"
    reason: Unmanaged
    status: Unknown
    type: Available
  - lastTransitionTime: "2021-04-14T12:03:47Z"
    reason: Unmanaged
    status: Unknown
    type: Progressing
  - lastTransitionTime: "2021-04-14T12:03:47Z"
    reason: Unmanaged
    status: Unknown
    type: Degraded
  - lastTransitionTime: "2021-04-14T12:03:47Z"
    reason: Unmanaged
    status: Unknown
    type: Upgradeable

@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 12, 2021

/retest

2 similar comments
@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 12, 2021

/retest

@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 13, 2021

/retest

... and this will also, via library-go/pkg/operator/status,
show up in ClusterOperators/service-ca , which was previously
reporting the default upgradeable Statu: Unknown, Reason: NoData.

https://bugzilla.redhat.com/show_bug.cgi?id=1948012

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 15, 2021

/retest

1 similar comment
@mtrmac
Copy link
Contributor Author

mtrmac commented Apr 17, 2021

/retest

@stlaz
Copy link
Contributor

stlaz commented May 25, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 25, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 25, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mtrmac, stlaz

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 25, 2021
@openshift-bot
Copy link
Contributor

/retest

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit 91b4991 into openshift:master May 25, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 25, 2021

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

Bugzilla bug 1948012 has been moved to the MODIFIED state.

In response to this:

Bug 1948012: Report the operator status as always upgradeable in serviceCA/cluster

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.

@mtrmac
Copy link
Contributor Author

mtrmac commented May 26, 2021

Note: openshift/origin#26030 should be partially dropped after this merges.

Happened in openshift/origin#26183 .

@mtrmac
Copy link
Contributor Author

mtrmac commented May 31, 2021

/cherrypick release-4.7

@openshift-cherrypick-robot

@mtrmac: new pull request created: #160

In response to this:

/cherrypick release-4.7

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

7 participants