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 1794678: Add clusteroperator status #71

Merged
merged 8 commits into from Apr 29, 2020

Conversation

enxebre
Copy link
Member

@enxebre enxebre commented Apr 22, 2020

This adds a controller to manage the clusterOperator status for the cluster-machine-approver which is currently missing.

Reconciliation is driven by a status.VersionGetter and a single object informer watcher.

"Available" is always reported atm but this enables the base to set degraded in desired scenarios in the near future e.g too many pending CSRs.

This also enables integration with must gather.

@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 Apr 22, 2020
@openshift-ci-robot
Copy link
Contributor

@enxebre: An error was encountered adding this pull request to the external tracker bugs for bug 1794678 on the Bugzilla server at https://bugzilla.redhat.com:

JSONRPC error 32000: Subcomponet is mandatory for the component 'Cloud Compute' in the product 'OpenShift Container Platform'.
Please contact an administrator to resolve this issue, then request a bug refresh with /bugzilla refresh.

In response to this:

Bug 1794678: WIP: Add clusteroperator status

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.

@enxebre
Copy link
Member Author

enxebre commented Apr 22, 2020

/bugzilla refresh

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

@enxebre: This pull request references Bugzilla bug 1794678, 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.5.0) matches configured target release for branch (4.5.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

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-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 Apr 22, 2020
@enxebre enxebre changed the title Bug 1794678: WIP: Add clusteroperator status Bug 1794678: Add clusteroperator status Apr 22, 2020
@enxebre
Copy link
Member Author

enxebre commented Apr 22, 2020

/hold cancel

@openshift-ci-robot
Copy link
Contributor

@enxebre: This pull request references Bugzilla bug 1794678, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.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 1794678: Add clusteroperator status

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 removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 22, 2020
@enxebre enxebre force-pushed the fix-1794678 branch 2 times, most recently from fd32360 to 5006411 Compare April 22, 2020 17:42
@enxebre
Copy link
Member Author

enxebre commented Apr 23, 2020

/retest

@openshift-ci-robot
Copy link
Contributor

@enxebre: This pull request references Bugzilla bug 1794678, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.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 1794678: Add clusteroperator status

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.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

@enxebre: This pull request references Bugzilla bug 1794678, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.5.0) matches configured target release for branch (4.5.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 1794678: Add clusteroperator status

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.

@enxebre
Copy link
Member Author

enxebre commented Apr 23, 2020

/hold
need to add rbac perms to access the clusterOperator resource

E0422 18:08:46.255318       1 reflector.go:178] github.com/openshift/cluster-machine-approver/status.go:93: Failed to list *v1.ClusterOperator: clusteroperators.config.openshift.io "machine-approver" is forbidden: User "system:serviceaccount:openshift-cluster-machine-approver:machine-approver-sa" cannot list resource "clusteroperators" in API group "config.openshift.io" at the cluster scope

A follow up will create PR against https://github.com/openshift/cluster-api-actuator-pkg to validate the object exists.

@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 Apr 23, 2020
status_suite_test.go Outdated Show resolved Hide resolved
status_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@elmiko elmiko left a comment

Choose a reason for hiding this comment

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

in general looks good to me, i had a question about the openapi spec but it's not a blocker.

submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
Copy link
Contributor

Choose a reason for hiding this comment

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

would we ever use a json pointer notation here to point back to the openapi v1.ObjectMeta definition in the kubernetes repo?

it would be crazy long reference, but i'm just curious.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is a snapshot just so the tests have the CRD available 3ee0a68#diff-390d58653a7a71d7b34e4ef2d39ae697R1

ObjectMeta is an api machinery top level known field for every resource.

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, thanks

i know ObjectMeta is all over the place, i was just kinda curious if these external schemas should use json pointers to reference back.

@enxebre
Copy link
Member Author

enxebre commented Apr 24, 2020

/retest

@enxebre
Copy link
Member Author

enxebre commented Apr 24, 2020

/retest

1 similar comment
@enxebre
Copy link
Member Author

enxebre commented Apr 24, 2020

/retest

@enxebre
Copy link
Member Author

enxebre commented Apr 24, 2020

/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 Apr 24, 2020
@enxebre
Copy link
Member Author

enxebre commented Apr 27, 2020

/test e2e-aws-upgrade

@openshift-ci-robot
Copy link
Contributor

@enxebre: The specified target(s) for /test were not found.
The following commands are available to trigger jobs:

  • /test e2e-aws
  • /test e2e-aws-operator
  • /test e2e-azure-operator
  • /test e2e-gcp-operator
  • /test images
  • /test unit

Use /test all to run all jobs.

In response to this:

/test e2e-aws-upgrade

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.

Copy link
Contributor

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

/lgtm

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

/retest

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

@enxebre
Copy link
Member Author

enxebre commented Apr 29, 2020

/retest

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 29, 2020

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

Test name Commit Details Rerun command
ci/prow/e2e-azure-operator a41f064 link /test e2e-azure-operator

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.

@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 d326f0a into openshift:master Apr 29, 2020
@openshift-ci-robot
Copy link
Contributor

@enxebre: All pull requests linked via external trackers have merged: openshift/cluster-machine-approver#71. Bugzilla bug 1794678 has been moved to the MODIFIED state.

In response to this:

Bug 1794678: Add clusteroperator status

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.

enxebre added a commit to enxebre/cluster-api-actuator-pkg that referenced this pull request May 12, 2020
Since we added support for the machine approver cluster operator, we want to validate it works as expected.
openshift/cluster-machine-approver#71
enxebre added a commit to enxebre/cluster-api-actuator-pkg that referenced this pull request May 12, 2020
Since we added support for the machine approver cluster operator, we want to validate it works as expected.
openshift/cluster-machine-approver#71
enxebre added a commit to enxebre/cluster-api-actuator-pkg that referenced this pull request May 12, 2020
Since we added support for the machine approver cluster operator, we want to validate it works as expected.
openshift/cluster-machine-approver#71
wking added a commit to wking/cluster-machine-approver that referenced this pull request May 21, 2020
We've used empty-string reasons since the status handling landed in
ed1c807 (CO status controller: Add logic to sync status,
2020-04-22, openshift#71).  But if we feel like we have a message we want to
set to help humans understand the available condition, we should be
setting a reason string for machines too.  AsExpected follows the
library-go precedent [1].

Also use AsExpected for some message-less but expected conditions,
like Progressing=False and Degraded=False. Having a reason makes it
easier for folks skimming logs to see that the condition is in its
happy state, and doesn't cost us any effort to set.

I am looking forward to the smarter logic promised by 91a58e6 (CO
status controller: Create controller skeleton, 2020-04-22, openshift#71),
because the current blind assumption that everything is working
seems... very optimistic ;).

[1]: https://github.com/openshift/library-go/blob/94c59dec54be25c8527e51e8c0a885712aeb01b5/pkg/operator/status/condition.go#L67
wking added a commit to wking/cluster-machine-approver that referenced this pull request May 21, 2020
We've used empty-string reasons since the status handling landed in
ed1c807 (CO status controller: Add logic to sync status,
2020-04-22, openshift#71).  But if we feel like we have a message we want to
set to help humans understand the available condition, we should be
setting a reason string for machines too.  AsExpected follows the
library-go precedent [1].

Also use AsExpected for some message-less but expected conditions,
like Progressing=False and Degraded=False. Having a reason makes it
easier for folks skimming logs to see that the condition is in its
happy state, and doesn't cost us any effort to set.

I am looking forward to the smarter logic promised by 91a58e6 (CO
status controller: Create controller skeleton, 2020-04-22, openshift#71),
because the current blind assumption that everything is working
seems... very optimistic ;).

[1]: https://github.com/openshift/library-go/blob/94c59dec54be25c8527e51e8c0a885712aeb01b5/pkg/operator/status/condition.go#L67
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

6 participants