-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Upgrading Control Plane fails due to invalid memory address #2633
Comments
|
|
Looks like we are not guarding against nil when checking /priority critical-urgent |
/assign |
@Xenwar could you please share your KubeadmControlPlane spec? |
@ncdc I'm pretty sure any spec that didn't include kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local would do it: if kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local != nil {
meta := kcp.Spec.KubeadmConfigSpec.ClusterConfiguration.Etcd.Local.ImageMeta
if err := workloadCluster.UpdateEtcdVersionInKubeadmConfigMap(ctx, meta.ImageRepository, meta.ImageTag); err != nil {
return ctrl.Result{}, errors.Wrap(err, "failed to update the etcd version in the kubeadm config map")
}
} |
Actually, I take that back, anything that didn't include |
Yes, I have a fix pending, but I am asking for confirmation. |
Sidenote: should ClusterConfiguration actually be optional, could it be defaulted to empty struct? |
The problem is less around go usage and more around yaml usage with non-optional fields. |
I'm generally ok if we default it via webhook. |
I was thinking that we could use the defaulting webhook here, if we want to keep the pointer. The check for ClusterConfiguration not being nil is everywhere, so might be worth it |
Fix is up at #2641 |
Here is the spec |
|
Thanks |
Hello @Xenwar and @ncdc |
If it's the exact same panic and root cause, see #3363 (comment). Otherwise, I would recommend filing a new issue with the full stack trace. |
Wait, you're asking about a pod called |
What steps did you take and what happened:
During upgrade, due to some unknown error, the pod crashes.
Working on getting the cause.
Note: The main focus of this bug report is on fixing the nil pointer issue, much like #2613.
What did you expect to happen:
A graceful failure
Environment:
/kind bug
The text was updated successfully, but these errors were encountered: