Skip to content

Bug 1932626: Gracefully handle service unavailable errors from kube-apiserver #2024

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

Merged

Conversation

joelanford
Copy link
Member

Signed-off-by: Joe Lanford [email protected]

Description of the change:
This PR changes the CSV install status update logic to avoid failing a CSV when there are there are transient errors connecting to the API server.

Motivation for the change:
OLM should not fire alerts during cluster upgrades when there are expected transient control plane connection issues.

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 1, 2021
}
}

logger.Info("couldn't find GVK in api discovery")
return olmErrors.GroupVersionKindNotFoundError{group, version, kind}
return false, nil
Copy link
Member Author

@joelanford joelanford Mar 1, 2021

Choose a reason for hiding this comment

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

I could not find any usage of isGVKRegistered where the actual content of the error was used, so I changed the function signature to separate the found/not found question from any errors that may have occurred trying to arrive at the answer.

If necessary, any caller of isGVKRegistered could trivially re-construct the previous behavior with:

func (a *Operator) oldIsGVKRegistered(group, version, kind string) error {
	ok, err := a.isGVKRegistered(group, version, kind)
	if err != nil {
		return err
	}
	if !ok {
		return olmErrors.GroupVersionKindNotFoundError{group, version, kind}
	}
	return nil
}

@joelanford joelanford changed the title WIP [Bug 1932626]: Gracefully handle service unavailable errors from kube-apiserver Bug 1932626: Gracefully handle service unavailable errors from kube-apiserver Mar 2, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Mar 2, 2021
@openshift-ci-robot
Copy link
Collaborator

@joelanford: This pull request references Bugzilla bug 1932626, 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.8.0) matches configured target release for branch (4.8.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1932626: Gracefully handle service unavailable errors from kube-apiserver

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-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 Mar 2, 2021
@joelanford
Copy link
Member Author

/retest

1 similar comment
@joelanford
Copy link
Member Author

/retest

@smarterclayton
Copy link
Collaborator

@joelanford
Copy link
Member Author

/retest

@benluddy
Copy link
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2021
Copy link
Member

@dinhxuanvu dinhxuanvu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 11, 2021
@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benluddy, dinhxuanvu, joelanford

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-bot
Copy link
Contributor

/retest

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

@joelanford
Copy link
Member Author

/retest

3 similar comments
@joelanford
Copy link
Member Author

/retest

@joelanford
Copy link
Member Author

/retest

@joelanford
Copy link
Member Author

/retest

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

@openshift-merge-robot openshift-merge-robot merged commit c8e2189 into operator-framework:master Mar 13, 2021
@openshift-ci-robot
Copy link
Collaborator

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

Bugzilla bug 1932626 has been moved to the MODIFIED state.

In response to this:

Bug 1932626: Gracefully handle service unavailable errors from kube-apiserver

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.

7 participants