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 1976379: UPSTREAM: <carry>: Reject the pod creation when we can not decide the cluster type #832

Merged
merged 1 commit into from Jun 29, 2021

Conversation

cynepco3hahue
Copy link

It is possible a race condition between pod creation and the update of the
infrastructure resource status with correct values under
Status.ControlPlaneTopology and Status.InfrastructureTopology.

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 Jun 29, 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:

@openshift-ci
Copy link

openshift-ci bot commented Jun 29, 2021

@cynepco3hahue: This pull request references Bugzilla bug 1976379, 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)

Requesting review from QA contact:
/cc @wangke19

In response to this:

Bug 1976379: UPSTREAM: : Reject the pod creation when we can not decide the cluster type

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-high Referenced Bugzilla bug's severity is high 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. labels Jun 29, 2021
@@ -180,6 +180,11 @@ func (a *managementCPUsOverride) Admit(ctx context.Context, attr admission.Attri
return admission.NewForbidden(attr, err) // can happen due to informer latency
}

// we can not decide the cluster type without Status.ControlPlaneTopology and Status.InfrastructureTopology
if clusterInfra.Status.ControlPlaneTopology == "" || clusterInfra.Status.InfrastructureTopology == "" {
return admission.NewForbidden(attr, fmt.Errorf("%s infrastructure resource %q has empty Status.ControlPlaneTopology or Status.InfrastructureTopology", PluginName, infraClusterName))
Copy link

Choose a reason for hiding this comment

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

lower-case field names

Copy link

Choose a reason for hiding this comment

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

the object name is redundant. There is only one.

Copy link
Author

Choose a reason for hiding this comment

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

done

… cluster type

It is possible a race condition between pod creation and the update of the
infrastructure resource status with correct values under
Status.ControlPlaneTopology and Status.InfrastructureTopology.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
@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:

@sttts
Copy link

sttts commented Jun 29, 2021

/lgtm
/approve

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

openshift-ci bot commented Jun 29, 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 Jun 29, 2021
@sttts sttts removed the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Jun 29, 2021
@cynepco3hahue
Copy link
Author

/cherry-pick release-4.8

@openshift-cherrypick-robot

@cynepco3hahue: once the present PR merges, I will cherry-pick it on top of release-4.8 in a new PR and assign it to you.

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.

@sttts
Copy link

sttts commented Jun 29, 2021

/retest

@cynepco3hahue
Copy link
Author

/test k8s-e2e-gcp

@openshift-merge-robot openshift-merge-robot merged commit b2e08e3 into openshift:master Jun 29, 2021
@openshift-ci
Copy link

openshift-ci bot commented Jun 29, 2021

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

Bugzilla bug 1976379 has been moved to the MODIFIED state.

In response to this:

Bug 1976379: UPSTREAM: : Reject the pod creation when we can not decide the cluster type

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: #833

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-high Referenced Bugzilla bug's severity is high 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

5 participants