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

Fix panic in Operator occuring during node replacement #1288

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

zimnx
Copy link
Collaborator

@zimnx zimnx commented Jun 26, 2023

Log messages and progressing condition were using nil Pod object which caused panic due to nil pointer dereference.

Fixes #1287

Log messages and progressing condition were using nil Pod object which
caused panic due to nil pointer dereference.

Fixes scylladb#1287
@zimnx zimnx added the kind/bug Categorizes issue or PR as related to a bug. label Jun 26, 2023
@zimnx zimnx added this to the v1.10 milestone Jun 26, 2023
@zimnx zimnx requested a review from rzetelskik June 26, 2023 08:30
@@ -360,13 +360,13 @@ func (scc *Controller) syncServices(

klog.V(2).InfoS("Pod has not been recreated by the StatefulSet controller yet",
"ScyllaCluster", klog.KObj(sc),
"Pod", klog.KObj(pod),
"Pod", klog.KObj(svc),
Copy link
Member

Choose a reason for hiding this comment

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

I think klog.ObjectRef{Namespace: svc.Namespace, Name: svc.Name} would be more fitting

Edit: klog.KRef(svc.Namespace, svc.Name)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

why would be more fitting? KObj is essentially doing that.

Copy link
Member

Choose a reason for hiding this comment

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

It's more explicit. Imo "Pod", klog.KObj(svc) looks unintentional and if I ever saw that without any comment, I'd probably think it's a mistake. I'm not insisting though, just a nit.

@rzetelskik rzetelskik self-requested a review June 26, 2023 15:13
@zimnx zimnx merged commit 7a2ef76 into scylladb:master Jun 26, 2023
20 checks passed
@zimnx zimnx deleted the mz/1287-service-panic branch June 26, 2023 15:17
@vponomaryov
Copy link
Contributor

Do you plan to backport it to 1.9?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
3 participants