-
Notifications
You must be signed in to change notification settings - Fork 413
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 2031049: Fix panic when PlatformStatus VSphere is nil #2865
Conversation
This PR is to resolve a panic when `PlatformStatus.VSphere` is nil.
@jcpowermac: This pull request references Bugzilla bug 2031049, which is invalid:
Comment In response to this:
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. |
/bugzilla refresh |
@jcpowermac: This pull request references Bugzilla bug 2031049, 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
No GitHub users were found matching the public email listed for the QA contact in Bugzilla (rioliu@redhat.com), skipping review request. In response to this:
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. |
/test e2e-vsphere |
I am still a little concerned about this. This section of code hasn't changed in 18 months. |
cc: @sinnykumari |
@@ -353,8 +353,12 @@ func getIgnitionHost(infraStatus *configv1.InfrastructureStatus) (string, error) | |||
case configv1.OvirtPlatformType: | |||
ignitionHost = net.JoinHostPort(infraStatus.PlatformStatus.Ovirt.APIServerInternalIP, securePortStr) | |||
case configv1.VSpherePlatformType: | |||
if infraStatus.PlatformStatus.VSphere.APIServerInternalIP != "" { | |||
ignitionHost = net.JoinHostPort(infraStatus.PlatformStatus.VSphere.APIServerInternalIP, securePortStr) | |||
if infraStatus.PlatformStatus.VSphere != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed we haven't changed this code in a while, so wondering why we are hitting this bug now. My main concern is, is this something expected on vSphere to have infraStatus.PlatformStatus.VSphere nil or something is missing during vSphere cluster install. Also, can it cause any possible issue later with cluster where we are not adding securePortStr on a vSphere cluster?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I think this was due to the recent PR merge to manage user data secret, as a result of
129d6e4#diff-3e205577bec1a1d1711df8bfeff30e63f044b24cfbdc69bbd7d0052fdc881891
and
59f1381#diff-3e205577bec1a1d1711df8bfeff30e63f044b24cfbdc69bbd7d0052fdc881891
Which we didn't do in sync.go prior to this since we (presumably) didn't need to figure out the ignition port. I may have been a little hasty on merging that PR. Maybe we can revisit that whole section? Otherwise the fix here (although it would get us past the failure) will still cause problems for the managed secret.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we may hit this bug on other platform handled in getIgnitionHost() right?
Jerry, since you have better context of #2827 , do you think it is better to revert the PR or check with PR author to see if we can fix the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @zaneb
I think this is because some of the old ported code may not be updated with updated assumptions on what can be nil on what platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no immediate plans to use the managed secret in vSphere, so I think we should go ahead with this fix.
It's not clear to me why infraStatus.PlatformStatus would be non-nil but infraStatus.PlatformStatus.VSphere nil on a vSphere cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so I dug around for this, and we aren't exactly internally consistent on this either. Namely, we have 2 functions that query for this field,
- in the operator:
func onPremPlatformAPIServerInternalIP(cfg mcfgv1.ControllerConfigSpec) (interface{}, error) { - in the template controller:
func onPremPlatformAPIServerInternalIP(cfg RenderConfig) (interface{}, error) {
I wonder why the operator one doesn't error. In any case I think we should probably look to de-duplicate the above 2 functions and then use the correct one here. At least we should be safe for the other platforms, so it's ok either way.
We can just merge this PR as is to unblock CI -> properly de-dupe as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on the discussion on the PR and unblock CI. Let's handle any additional fixes that would be useful in a follow-up PR.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jcpowermac, rvanderp3, sinnykumari 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 |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
7 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
10 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/skip |
@jcpowermac: The following tests failed, say
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/test-infra repository. I understand the commands that are listed here. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/test e2e-agnostic-upgrade |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
5 similar comments
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
/retest-required Please review the full test history for this PR and help us cut down flakes. |
@jcpowermac: All pull requests linked via external trackers have merged: Bugzilla bug 2031049 has been moved to the MODIFIED state. In response to this:
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. |
This PR is to resolve a panic when
PlatformStatus.VSphere
is nil.