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 1982868: UPSTREAM: <carry>: admission/managementcpusoverride: cover the roll-back case #877

Conversation

cynepco3hahue
Copy link

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

@openshift-ci-robot openshift-ci-robot added the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Aug 3, 2021
@openshift-ci
Copy link

openshift-ci bot commented Aug 3, 2021

@cynepco3hahue: This pull request references Bugzilla bug 1982868, which is invalid:

  • expected the bug to be open, but it isn't
  • expected the bug to target the "4.9.0" release, but it targets "4.8.0" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, ON_DEV, POST, POST, but it is CLOSED (DUPLICATE) 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 1982868: UPSTREAM: : cover the roll-back case

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 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 Aug 3, 2021
@openshift-ci-robot
Copy link

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

@cynepco3hahue
Copy link
Author

/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 Aug 3, 2021
@openshift-ci
Copy link

openshift-ci bot commented Aug 3, 2021

@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
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

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:

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

// 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 == "" {
Copy link
Member

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.

Copy link

@sttts sttts Aug 3, 2021

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.

@sttts
Copy link

sttts commented Aug 3, 2021

Please use commit titles that make sense out of context. This is about management cpu separation. So put something like admission/managementcpusoverride: into the commit message (and PR title). Makes our lifes easier later.

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{}) {
Copy link

@sttts sttts Aug 3, 2021

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.

@cynepco3hahue cynepco3hahue force-pushed the admission_plugin_handle_the_cluster_rollback branch from 1e44679 to 3d00a0c Compare August 4, 2021 14:08
@openshift-ci-robot
Copy link

@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>
@cynepco3hahue cynepco3hahue force-pushed the admission_plugin_handle_the_cluster_rollback branch from 3d00a0c to 0317fc6 Compare August 4, 2021 14:21
@openshift-ci-robot
Copy link

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

@cynepco3hahue cynepco3hahue changed the title Bug 1982868: UPSTREAM: <carry>: cover the roll-back case Bug 1982868: UPSTREAM: <carry>: admission/managementcpusoverride: cover the roll-back case Aug 4, 2021
@sttts
Copy link

sttts commented Aug 4, 2021

/lgtm
/approve

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

openshift-ci bot commented Aug 4, 2021

[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 /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 Aug 4, 2021
@cynepco3hahue
Copy link
Author

cynepco3hahue commented Aug 4, 2021

/hold
@sttts @soltysh Should it be merged only after the rebase?

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 4, 2021
@cynepco3hahue
Copy link
Author

/retest

@openshift-bot
Copy link

/retest-required

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

2 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@cynepco3hahue
Copy link
Author

/retest

@openshift-bot
Copy link

/retest-required

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

7 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@cynepco3hahue
Copy link
Author

/retest

@openshift-bot
Copy link

/retest-required

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

3 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@cynepco3hahue
Copy link
Author

/retest

@openshift-bot
Copy link

/retest-required

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

2 similar comments
@openshift-bot
Copy link

/retest-required

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

@openshift-bot
Copy link

/retest-required

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

@cynepco3hahue
Copy link
Author

/retest

@openshift-bot
Copy link

/retest-required

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

1 similar comment
@openshift-bot
Copy link

/retest-required

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

@cynepco3hahue
Copy link
Author

/retest

@openshift-ci
Copy link

openshift-ci bot commented Aug 19, 2021

@cynepco3hahue: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-agnostic-cmd 0317fc6 link /test e2e-agnostic-cmd

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.

@openshift-merge-robot openshift-merge-robot merged commit f77e483 into openshift:master Aug 19, 2021
@openshift-ci
Copy link

openshift-ci bot commented Aug 19, 2021

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

Bugzilla bug 1982868 has been moved to the MODIFIED state.

In response to this:

Bug 1982868: UPSTREAM: : admission/managementcpusoverride: cover the roll-back case

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

@cynepco3hahue: new pull request created: #895

In response to this:

/cherry-pick release-4.8

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

8 participants