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 1753778: report Available when registry is explicitly Removed #387

Merged
merged 1 commit into from Oct 2, 2019

Conversation

dmage
Copy link
Member

@dmage dmage commented Sep 20, 2019

No description provided.

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 20, 2019
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 20, 2019
@dmage dmage changed the title Report Available when registry is explicitly Removed Bug 1753778: report Available when registry is explicitly Removed Sep 20, 2019
@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 Sep 20, 2019
@openshift-ci-robot
Copy link
Contributor

@dmage: This pull request references Bugzilla bug 1753778, 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.

In response to this:

Bug 1753778: report Available when registry is explicitly Removed

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.

@dmage
Copy link
Member Author

dmage commented Sep 20, 2019

/test e2e-aws-operator

1 similar comment
@dmage
Copy link
Member Author

dmage commented Sep 20, 2019

/test e2e-aws-operator

@@ -87,10 +87,18 @@ func (c *Controller) syncStatus(cr *imageregistryv1.Config, deploy *appsapi.Depl
Message: "",
Reason: "",
}
if deploy == nil {
if cr.Spec.ManagementState == operatorapiv1.Unmanaged {
operatorAvailable.Status = operatorapiv1.ConditionTrue
Copy link
Contributor

Choose a reason for hiding this comment

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

If it is Unmanaged doesn't it make sense to set this to UNKNOWN instead of true?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, but we don't want to block upgrades, so we report that everything is OK.

Copy link
Member Author

Choose a reason for hiding this comment

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

@bparees but honestly we are lying to CVO, really we may have problems, especially after upgrades. If we have the Unknown state, maybe it's better to use it?

Copy link
Contributor

Choose a reason for hiding this comment

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

@dmage Think of it this way - if not in the Managed state, Available means "Can the operator do what you ask it to do?" Unless we are not running, the answer is yes/True.

Ex: if the management state is changed from Unmanaged to Managed, will the operator react as expected? Yes.

t.Fatal(err)
}

// TODO(dmage): wait for the resource to be observed
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we planning to wait for this one before merging? This could generate some flake events, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, we have retries below.

Copy link
Contributor

Choose a reason for hiding this comment

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

So we don't need the TODO right? Or I misunderstand you?

@dmage
Copy link
Member Author

dmage commented Sep 24, 2019

/retest

@ricardomaraschini
Copy link
Contributor

/lgtm

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

/retest

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

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

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

@dmage
Copy link
Member Author

dmage commented Sep 25, 2019

/retest

@openshift-bot
Copy link
Contributor

/retest

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

@adambkaplan
Copy link
Contributor

/hold

Known issue with 1.16 storage tests (waiting for kubelet/RHCOS skew to be reconciled).

@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 Sep 25, 2019
Copy link
Contributor

@ricardomaraschini ricardomaraschini left a comment

Choose a reason for hiding this comment

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

Looks pretty neat. I have left a couple of comments more for sanity check.

if e, ok := applyError.(permanentError); ok {
operatorAvailable.Message = applyError.Error()
operatorAvailable.Reason = e.Reason
} else if removed {
operatorAvailable.Status = operatorapiv1.ConditionTrue
operatorAvailable.Message = "The deployment is removed"
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we make this Message something like down below when we read:

"The registry is removed"

t.Fatal(err)
}

// TODO(dmage): wait for the resource to be observed
Copy link
Contributor

Choose a reason for hiding this comment

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

So we don't need the TODO right? Or I misunderstand you?


// TODO(dmage): wait for the resource to be observed

err = client.Deployments(imageregistryv1.ImageRegistryOperatorNamespace).Delete(imageregistryv1.ImageRegistryName, &metav1.DeleteOptions{})
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this Delete automatically happen slightly after we set the Management State to Removed?

@adambkaplan
Copy link
Contributor

/lgtm cancel

@dmage please address or remove the TODOs in your comments.

/retest

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2019
@adambkaplan
Copy link
Contributor

/hold cancel

RHCOS skew issues should be resolved now

@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 Oct 1, 2019
@ricardomaraschini
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dmage, ricardomaraschini

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-merge-robot openshift-merge-robot merged commit 83ab7d8 into openshift:master Oct 2, 2019
@openshift-ci-robot
Copy link
Contributor

@dmage: All pull requests linked via external trackers have merged. Bugzilla bug 1753778 has been moved to the MODIFIED state.

In response to this:

Bug 1753778: report Available when registry is explicitly Removed

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.

@dmage
Copy link
Member Author

dmage commented Nov 14, 2019

/cherrypick release-4.2

@openshift-cherrypick-robot

@dmage: new pull request created: #412

In response to this:

/cherrypick release-4.2

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.

@ricardomaraschini
Copy link
Contributor

/cherrypick release-4.1

@openshift-cherrypick-robot

@ricardomaraschini: #387 failed to apply on top of branch "release-4.1":

error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/operator/status.go
Falling back to patching base and 3-way merge...
Removing test/e2e/unmanaged_test.go
Auto-merging pkg/operator/status.go
CONFLICT (content): Merge conflict in pkg/operator/status.go
Patch failed at 0001 Report Available when registry is explicitly Removed

In response to this:

/cherrypick release-4.1

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/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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants