Skip to content

Bug 2095229: desiredRouterDeployment: Check for nil hostNetwork#780

Merged
openshift-ci[bot] merged 1 commit intoopenshift:masterfrom
Miciah:BZ2095229-desiredRouterDeployment-check-for-nil-hostNetwork
Jun 15, 2022
Merged

Bug 2095229: desiredRouterDeployment: Check for nil hostNetwork#780
openshift-ci[bot] merged 1 commit intoopenshift:masterfrom
Miciah:BZ2095229-desiredRouterDeployment-check-for-nil-hostNetwork

Conversation

@Miciah
Copy link
Contributor

@Miciah Miciah commented Jun 14, 2022

Check whether the ingresscontroller's status.endpointPublishingStrategy.hostNetwork field is nil before trying to dereference it.

Before this change, the operator would crash-loop with a nil pointer dereference if the cluster had been upgraded from an earlier version of OpenShift where the cluster had had an ingresscontroller with status.endpointPublishingStrategy.type set to "HostNetwork".

Follow-up to #694.

  • pkg/operator/controller/ingress/deployment.go (desiredRouterDeployment): Check whether the ingresscontroller's status.endpointPublishingStrategy.hostNetwork field is nil before trying to dereference it.
  • pkg/operator/controller/ingress/deployment_test.go (TestDesiredRouterDeploymentHostNetworkNil): New test. Verify that desiredRouterDeployment behaves correctly when the ingresscontroller's status.endpointPublishingStrategy.type is "HostNetwork" but status.endpointPublishingStrategy.hostNetwork is nil.

Check whether the ingresscontroller's
status.endpointPublishingStrategy.hostNetwork
field is nil before trying to dereference it.

Before this commit, the operator would crash-loop with a nil pointer
dereference if the cluster had been upgraded from an earlier version
of OpenShift where the cluster had had an ingresscontroller with
status.endpointPublishingStrategy.type set to "HostNetwork".

This commit fixes bug 2095229.

https://bugzilla.redhat.com/show_bug.cgi?id=2095229

Follow-up to commit af653f9.

* pkg/operator/controller/ingress/deployment.go (desiredRouterDeployment):
Check whether the ingresscontroller's
status.endpointPublishingStrategy.hostNetwork
field is nil before trying to dereference it.
* pkg/operator/controller/ingress/deployment_test.go
(TestDesiredRouterDeploymentHostNetworkNil): New test.  Verify that
desiredRouterDeployment behaves correctly when the ingresscontroller's
status.endpointPublishingStrategy.type is "HostNetwork" but
status.endpointPublishingStrategy.hostNetwork is nil.
@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 Jun 14, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 14, 2022

@Miciah: This pull request references Bugzilla bug 2095229, which is invalid:

  • expected the bug to target the "4.11.0" release, but it targets "---" 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.

Details

In response to this:

Bug 2095229: desiredRouterDeployment: Check for nil hostNetwork

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 requested review from lmzuccarelli and rfredette June 14, 2022 02:10
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 14, 2022
@Miciah
Copy link
Contributor Author

Miciah commented Jun 14, 2022

/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 Jun 14, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 14, 2022

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

Requesting review from QA contact:
/cc @lihongan

Details

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.

@openshift-ci openshift-ci bot requested a review from lihongan June 14, 2022 02:12
@frobware
Copy link
Contributor

/lgtm

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

openshift-ci bot commented Jun 15, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: frobware, Miciah

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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-robot
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 6cb35a1 and 8 for PR HEAD 456d8a1 in total

@openshift-ci-robot
Copy link
Contributor

/retest-required

Remaining retests: 1 against base HEAD 6cb35a1 and 7 for PR HEAD 456d8a1 in total

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 15, 2022

@Miciah: all tests passed!

Full PR test history. Your PR dashboard.

Details

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-ci openshift-ci bot merged commit 6f01712 into openshift:master Jun 15, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 15, 2022

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

Bugzilla bug 2095229 has been moved to the MODIFIED state.

Details

In response to this:

Bug 2095229: desiredRouterDeployment: Check for nil hostNetwork

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.

3 participants