Skip to content

Bug 2093462: status: Watch clusteroperators#714

Merged
openshift-ci[bot] merged 1 commit intoopenshift:masterfrom
Miciah:status-watch-clusteroperators
Jun 24, 2022
Merged

Bug 2093462: status: Watch clusteroperators#714
openshift-ci[bot] merged 1 commit intoopenshift:masterfrom
Miciah:status-watch-clusteroperators

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Mar 3, 2022

Add a watch on clusteroperators in the status controller so that it updates or recreates the ingress clusteroperator as necessary should something else update or delete it.

  • manifests/00-cluster-role.yaml: Allow the operator to list and watch clusteroperators.
  • pkg/operator/controller/status/controller.go (New): Watch clusteroperators with a map function and predicate to reconcile the default ingresscontroller if clusteroperators.config.openshift.io/ingress is updated.
  • test/e2e/all_test.go (TestAll): Add the new TestOperatorRecreatesItsClusterOperator test to the serial tests.
  • test/e2e/operator_test.go (TestOperatorRecreatesItsClusterOperator): New test. Verify that the operator recreates the "ingress" clusteroperator if the clusteroperator is deleted.

This PR is the cluster-ingress-operator equivalent of openshift/cluster-dns-operator#261.

This PR supersedes #702. Cc: @mfojtik

@openshift-ci openshift-ci bot requested review from knobunc and miheer March 3, 2022 20:27
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 3, 2022
@openshift-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@openshift-ci openshift-ci bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 2, 2022
@gcs278
Copy link
Contributor

gcs278 commented Jun 3, 2022

The new E2E test will need to be added to all_tests.go due to E2E updates

@gcs278
Copy link
Contributor

gcs278 commented Jun 3, 2022

/retitle Bug 2093462: status: Watch clusteroperators

@openshift-ci openshift-ci bot changed the title status: Watch clusteroperators Bug 2093462: status: Watch clusteroperators Jun 3, 2022
@openshift-ci openshift-ci bot added the bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. label Jun 3, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2022

@Miciah: This pull request references Bugzilla bug 2093462, which is invalid:

  • expected the bug to target the "4.11.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.

Details

In response to this:

Bug 2093462: status: Watch clusteroperators

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 openshift-ci bot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Jun 3, 2022
@gcs278
Copy link
Contributor

gcs278 commented Jun 3, 2022

/bugzilla refresh

@openshift-ci openshift-ci bot 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 Jun 3, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2022

@gcs278: This pull request references Bugzilla bug 2093462, 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.11.0) matches configured target release for branch (4.11.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 @lihongan

Details

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.

@openshift-ci openshift-ci bot requested a review from lihongan June 3, 2022 19:18
@Miciah Miciah force-pushed the status-watch-clusteroperators branch 2 times, most recently from 9c35ad7 to 869481c Compare June 3, 2022 20:44
@openshift-ci openshift-ci bot added bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. and removed bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. labels Jun 3, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2022

@Miciah: This pull request references Bugzilla bug 2093462, which is invalid:

  • expected the bug to target the "4.11.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.

Details

In response to this:

Bug 2093462: status: Watch clusteroperators

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.

@Miciah
Copy link
Contributor Author

Miciah commented Jun 3, 2022

Updated for #756.

@Miciah
Copy link
Contributor Author

Miciah commented Jun 3, 2022

/bugzilla refresh

@openshift-ci openshift-ci bot added bugzilla/severity-low Referenced Bugzilla bug's severity is low 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. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jun 3, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 3, 2022

@Miciah: This pull request references Bugzilla bug 2093462, which is valid.

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

Requesting review from QA contact:
/cc @lihongan

Details

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.

@Miciah
Copy link
Contributor Author

Miciah commented Jun 3, 2022

         --- FAIL: TestAll/parallel/TestHAProxyTimeouts (35.86s)
        --- FAIL: TestAll/parallel/TestHAProxyTimeoutsRejection (38.09s) 

/test e2e-aws-operator

@Miciah
Copy link
Contributor Author

Miciah commented Jun 6, 2022

Must-gather.
/test e2e-aws-operator

Failing invariants:

[bz-monitoring][invariant] alert/Watchdog must have no gaps or changes

/test e2e-aws-single-node

@candita
Copy link
Contributor

candita commented Jun 7, 2022

I think the bindata.go update was missing from openshift/cluster-dns-operator#261

&source.Kind{Type: &configv1.ClusterOperator{}},
// The status controller doesn't care which ingresscontroller it
// is reconciling, so just enqueue a request to reconcile the
// default ingresscontroller.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't it necessary to reconcile all the ingresscontrollers? Because there is only one cluster operator for all ingresscontrollers?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, the status controller just needs some ingresscontroller for its reconciliation request, which will cause it to update the "ingress" clusteroperator, and there should always be a "default" ingresscontroller.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we accept #778, there might not be a default ingresscontroller, but I think more work probably needs to be done on that.

}
if err := kclient.Delete(context.TODO(), co); err != nil {
t.Fatalf("failed to delete clusteroperator %q: %v", coName.Name, err)
}
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 a way to check/wait until it's deleted before verifying that it is recreated automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could add a check to verify that the UID changed.

@Miciah
Copy link
Contributor Author

Miciah commented Jun 8, 2022

I think the bindata.go update was missing from openshift/cluster-dns-operator#261

The ingress operator only includes manifests/ in its bindata.go because the ingress-operator executable includes a subcommand that emits the manifests, which the installer uses to provide manifests that the user can edit to customize them at install-time. See c77d6aa.

@Miciah Miciah force-pushed the status-watch-clusteroperators branch from 869481c to 1d65abf Compare June 8, 2022 16:32
@Miciah
Copy link
Contributor Author

Miciah commented Jun 8, 2022

Last push updates TestOperatorRecreatesItsClusterOperator to check the clusteroperator's deletion timestamp and uid to verify that it really has been recreated.

@candita
Copy link
Contributor

candita commented Jun 8, 2022

/test e2e-upgrade

Add a watch on clusteroperators in the status controller so that it updates
or recreates the ingress clusteroperator as necessary should something else
update or delete it.

This commit fixes bug 2093462.

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

* manifests/00-cluster-role.yaml: Allow the operator to list and watch
clusteroperators.
* pkg/manifests/bindata.go: Regenerate.
* pkg/operator/controller/status/controller.go (New): Watch
clusteroperators with a map function and predicate to reconcile the default
ingresscontroller if clusteroperators.config.openshift.io/ingress is
updated.
* test/e2e/all_test.go (TestAll): Add the new
TestOperatorRecreatesItsClusterOperator test to the serial tests.
* test/e2e/operator_test.go (TestOperatorRecreatesItsClusterOperator): New
test.  Verify that the operator recreates the "ingress" clusteroperator if
the clusteroperator is deleted.
@Miciah Miciah force-pushed the status-watch-clusteroperators branch from 1d65abf to a21bde2 Compare June 23, 2022 15:37
@Miciah
Copy link
Contributor Author

Miciah commented Jun 23, 2022

Rebased.

@candita
Copy link
Contributor

candita commented Jun 23, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2022
@candita
Copy link
Contributor

candita commented Jun 23, 2022

/test e2e-aws-operator

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 23, 2022

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

Details 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

@Miciah
Copy link
Contributor Author

Miciah commented Jun 23, 2022

/retest

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 84d7e67 and 8 for PR HEAD a21bde2 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 84d7e67 and 7 for PR HEAD a21bde2 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 0 against base HEAD 84d7e67 and 6 for PR HEAD a21bde2 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 24, 2022

@Miciah: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-ci openshift-ci bot merged commit de9a92f into openshift:master Jun 24, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 24, 2022

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

Bugzilla bug 2093462 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2093462: status: Watch clusteroperators

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-low Referenced Bugzilla bug's severity is low 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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants