-
Notifications
You must be signed in to change notification settings - Fork 231
Show error message when fail to get clusterId from infrastructure #639
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
Conversation
pkg/controller/machine/controller.go
Outdated
|
|
||
| // Add clusterID label | ||
| if err := r.setClusterIDLabel(ctx, m); err != nil { | ||
| klog.Errorf("%v: failed to get infrastructure for machine: %v", machineName, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error message does not corresponds with the caller that is returning it.
We should either rephrase or move it inside the function where trying to get the infra resource.
Also wouldn't this error be logged by controller runtime https://github.com/kubernetes-sigs/controller-runtime/blob/bb96678bedc9d98361be219cb21562eb99ab9e15/pkg/internal/controller/controller.go#L235?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It didn't show any error in CI runs: https://storage.googleapis.com/origin-ci-test/pr-logs/pull/openshift_cluster-api-provider-openstack/106/pull-ci-openshift-cluster-api-provider-openstack-master-e2e-openstack/1282763600154333184/artifacts/e2e-openstack/pods/openshift-machine-api_machine-api-controllers-66d8c68c7c-zlwx4_machine-controller.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how did you conclude that's failing then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configv1 was not imported into the scheme. I just spent some time, executing the openstack provider manually 🙄 and mentioned the conclusion here: openshift/cluster-api-provider-openstack#106 (comment) As you can see, it's the first successful CI pass for that PR.
Adds missing infrastructure log error message, causing non-representative machine reconcile error loops, when there is an re-occuring error with client.Get on the infrastructure resource.
4e3291d to
ba68f93
Compare
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
JoelSpeed
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also under the impression that controller-runtime would log an error if we return it? We have made that assumption in a lot of places, so why are we not getting those logs?
https://github.com/kubernetes-sigs/controller-runtime/blob/bb96678bedc9d98361be219cb21562eb99ab9e15/pkg/internal/controller/controller.go#L235
|
@Danil-Grigorev: The following tests failed, say
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. DetailsInstructions 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. |
|
closing in favour of #644 @Danil-Grigorev Is there an answer for #639 (review) so we can capture an action item for this? |
I'll look for conformation later. |
Adds missing infrastructure log error message, causing non-representative machine reconcile error loops
when there is a re-occuring error with
client.Geton the infrastructure resource.