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

OCPBUGS-37668: [release-4.17]: Fix operator quick restart for SNO #1001

Merged

Conversation

zeeke
Copy link
Contributor

@zeeke zeeke commented Sep 4, 2024

When webooks are disabled, shutdown procedure produces the following
panic error:
```
2024-08-13T12:45:04.971685297Z	INFO	shutdown	utils/shutdown.go:22	Done clearing finalizers on exit
2024-08-13T12:45:04.971713179Z	INFO	shutdown	utils/shutdown.go:23	Seting webhook failure policies to Ignore on exit
2024-08-13T12:45:04.978386488Z	ERROR	shutdown	utils/shutdown.go:64	Error getting webhook	{"error": "validatingwebhookconfigurations.admissionregistration.k8s.io \"sriov-operator-webhook-config\" not found"}
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils.updateValidatingWebhook(0x37d7788?)
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils/shutdown.go:75 +0x198
github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils.updateWebhooks()
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils/shutdown.go:64 +0xa5
github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils.Shutdown()
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/pkg/utils/shutdown.go:23 +0x14
main.main()
	/go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/main.go:296 +0x1e6a
```

Fix the panic error and add an end2end test case to cover it.

Signed-off-by: Andrea Panattoni <[email protected]>
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. labels Sep 4, 2024
@openshift-ci-robot
Copy link
Contributor

@zeeke: This pull request references Jira Issue OCPBUGS-37668, which is invalid:

  • release note text must be set and not match the template OR release note type must be set to "Release Note Not Required". For more information you can reference the OpenShift Bug Process.

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

4.17 Backport of:

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. label Sep 4, 2024
@openshift-ci openshift-ci bot requested review from fedepaol and pliurh September 4, 2024 16:06
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 4, 2024
@zeeke
Copy link
Contributor Author

zeeke commented Sep 4, 2024

/retest

Copy link
Contributor

openshift-ci bot commented Sep 5, 2024

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

Test name Commit Details Required Rerun command
ci/prow/e2e-openstack-nfv-hwoffload f521b1e link false /test e2e-openstack-nfv-hwoffload

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-sigs/prow repository. I understand the commands that are listed here.

@zeeke
Copy link
Contributor Author

zeeke commented Sep 5, 2024

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Sep 5, 2024
@openshift-ci-robot
Copy link
Contributor

@zeeke: This pull request references Jira Issue OCPBUGS-37668, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.17.0) matches configured target version for branch (4.17.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-23795 is in the state Verified, which is one of the valid states (MODIFIED, ON_QA, VERIFIED)
  • dependent Jira Issue OCPBUGS-23795 targets the "4.18.0" version, which is one of the valid target versions: 4.18.0
  • bug has dependents

Requesting review from QA contact:
/cc @zhaozhanqi

In response to this:

/jira 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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from zhaozhanqi September 5, 2024 08:48
@zeeke
Copy link
Contributor Author

zeeke commented Sep 16, 2024

/test e2e-telco5g-sriov

@zeeke
Copy link
Contributor Author

zeeke commented Sep 16, 2024

🟢 newly added test case passed on ci/prow/e2e-telco5g-sriov:

SRIOV Operator conformance tests: [It] [sriov] operator No SriovNetworkNodePolicy should gracefully restart quickly webhooks enabled	5s
SRIOV Operator conformance tests: [It] [sriov] operator No SriovNetworkNodePolicy should gracefully restart quickly webhooks disabled

@SchSeba @evgenLevin can you please take a look at this backport?

@zeeke
Copy link
Contributor Author

zeeke commented Oct 7, 2024

@SchSeba, @wizhaoredhat can you take a look at this backport?

@evgenLevin, @ajaggapa, I need qe approval, too, when you have time (cherry-pick-approved)

@ajaggapa
Copy link

ajaggapa commented Oct 7, 2024

/cherry-pick-approved

@zeeke
Copy link
Contributor Author

zeeke commented Oct 7, 2024

/cherry-pick-approved

did you mean /label cherry-pick-approved ? 🙂

@ajaggapa
Copy link

ajaggapa commented Oct 7, 2024

/label cherry-pick-approved

@SchSeba
Copy link
Contributor

SchSeba commented Oct 7, 2024

/lgtm
/approve
/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Oct 7, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 7, 2024
Copy link
Contributor

openshift-ci bot commented Oct 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SchSeba, zeeke

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

@ajaggapa
Copy link

ajaggapa commented Oct 7, 2024

/label cherry-pick-approved

@openshift-ci openshift-ci bot added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Oct 7, 2024
@zeeke
Copy link
Contributor Author

zeeke commented Oct 7, 2024

/override ci/prow/e2e-openstack-nfv-hwoffload

job ci/prow/e2e-openstack-nfv-hwoffload has been removed from CI configuration

Copy link
Contributor

openshift-ci bot commented Oct 7, 2024

@zeeke: Overrode contexts on behalf of zeeke: ci/prow/e2e-openstack-nfv-hwoffload

In response to this:

/override ci/prow/e2e-openstack-nfv-hwoffload

job ci/prow/e2e-openstack-nfv-hwoffload has been removed from CI configuration

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-sigs/prow repository.

@openshift-merge-bot openshift-merge-bot bot merged commit 40fc75e into openshift:release-4.17 Oct 7, 2024
13 checks passed
@openshift-ci-robot
Copy link
Contributor

@zeeke: Jira Issue OCPBUGS-37668: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-37668 has been moved to the MODIFIED state.

In response to this:

4.17 Backport of:

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 openshift-eng/jira-lifecycle-plugin repository.

@zeeke
Copy link
Contributor Author

zeeke commented Oct 7, 2024

/jira backport release-4.16,release-4.15,release-4.14

@openshift-ci-robot
Copy link
Contributor

@zeeke: Missing required branches for backport chain:

  • branch with one of the following target versions: [4.17.0]

In response to this:

/jira backport release-4.16,release-4.15,release-4.14

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 openshift-eng/jira-lifecycle-plugin repository.

@zeeke
Copy link
Contributor Author

zeeke commented Oct 7, 2024

/cherrypick release-4.16

@openshift-cherrypick-robot

@zeeke: new pull request created: #1011

In response to this:

/cherrypick release-4.16

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-sigs/prow repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: sriov-network-operator
This PR has been included in build sriov-network-operator-container-v4.17.0-202410071236.p0.g40fc75e.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: sriov-network-config-daemon
This PR has been included in build sriov-network-config-daemon-container-v4.17.0-202410071236.p0.g40fc75e.assembly.stream.el9.
All builds following this will include this PR.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: sriov-network-webhook
This PR has been included in build sriov-network-webhook-container-v4.17.0-202410071236.p0.g40fc75e.assembly.stream.el9.
All builds following this will include this PR.

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. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.