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 1982868: UPSTREAM: <carry>: admission/managementcpusoverride: cover the roll-back case #877
Bug 1982868: UPSTREAM: <carry>: admission/managementcpusoverride: cover the roll-back case #877
Conversation
@cynepco3hahue: This pull request references Bugzilla bug 1982868, which is invalid:
Comment In response to this:
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. |
@cynepco3hahue: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
/bugzilla refresh |
@cynepco3hahue: This pull request references Bugzilla bug 1982868, 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
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (schoudha@redhat.com), skipping review request. In response to this:
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. |
// the infrastructure status is not empty, but topology related fields do not have any values indicates that | ||
// the cluster is during the roll-back process to the version that does not support the topology fields | ||
// the upgrade to 4.8 handled by the CR defaulting | ||
if clusterInfra.Status.ControlPlaneTopology == "" && clusterInfra.Status.InfrastructureTopology == "" { |
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.
you don't actually need this block, right? Because if they are empty strings for whatever reason, the != configv1.SingleReplicaTopologyMode
escape immediately below will already return nil
.
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 prefer an explicit statement rather than a coincidence in code that does not intentionally handle this case.
Please use commit titles that make sense out of context. This is about management cpu separation. So put something like |
if clusterInfra.Status.ControlPlaneTopology == "" || clusterInfra.Status.InfrastructureTopology == "" { | ||
return admission.NewForbidden(attr, fmt.Errorf("%s infrastructure resource has empty status.controlPlaneTopology or status.infrastructureTopology", PluginName)) | ||
// the infrastructure status is empty, so we can not decide the cluster type | ||
if reflect.DeepEqual(clusterInfra.Status, configv1.InfrastructureStatus{}) { |
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 breaks when somebody adds a default to a status field. You might decide that this is fine, but this needs a smoke test that make sure we would notice. This is a blocker for the PR.
This works even with defaults of status, as long as there is a field in InfrastructureStatus
that is set whenever the status is written, and this is always the case, right? So I think we only need a clear godoc comment why this works. Something along ^ lines.
1e44679
to
3d00a0c
Compare
@cynepco3hahue: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
…ack case During the upgrade and roll-back flow 4.7->4.8->4.7, the topology related fields under the infrastructure can be empty because the old API does not support them. The code will equal the empty infrastructure section with the current one. When the status has some other non-empty field, and topology fields are empty, we assume that the cluster currently passes via roll-back and not via the clean install. Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
3d00a0c
to
0317fc6
Compare
@cynepco3hahue: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cynepco3hahue, sttts 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 |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
7 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
2 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest |
@cynepco3hahue: The following test failed, say
Full PR test history. Your PR dashboard. 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. |
@cynepco3hahue: All pull requests linked via external trackers have merged: Bugzilla bug 1982868 has been moved to the MODIFIED state. In response to this:
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. |
@cynepco3hahue: new pull request created: #895 In response to this:
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. |
During the upgrade and roll-back flow 4.7->4.8->4.7, the topology related
fields under the infrastructure can be empty because the
old API does not support them.
The code will equal the empty infrastructure section with the current one.
When the status has some other non-empty field, and topology fields
are empty, we assume that the cluster currently passes
via roll-back and not via the clean install.
Signed-off-by: Artyom Lukianov alukiano@redhat.com