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
ceph: fix panic when recreating the csidriver object #8582
Conversation
Initialize the client and the csidriver object before calling the reCreateCSIDriverInfo function. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
Note:- This needs to be backported to 1.6 and 1.7 |
22b8088
to
8419024
Compare
@@ -584,6 +583,7 @@ func startDrivers(clientset kubernetes.Interface, rookclientset rookclient.Inter | |||
return errors.Wrapf(err, "failed to start cephfs provisioner deployment: %+v", cephfsProvisionerDeployment) | |||
} | |||
k8sutil.AddRookVersionLabelToDeployment(cephfsProvisionerDeployment) | |||
logger.Info("successfully started CSI CephFS driver") |
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.
Shall we have a separate message for the volume plugin (line 555) and the provisioner here?
logger.Info("successfully started CSI CephFS driver") | |
logger.Info("successfully started CSI CephFS provisioner") |
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.
@travisn as we are starting both provisioner and daemonset I left the logging as it was previously
@@ -516,6 +514,7 @@ func startDrivers(clientset kubernetes.Interface, rookclientset rookclient.Inter | |||
return errors.Wrapf(err, "failed to start rbd provisioner deployment: %+v", rbdProvisionerDeployment) | |||
} | |||
k8sutil.AddRookVersionLabelToDeployment(rbdProvisionerDeployment) | |||
logger.Info("successfully started CSI Ceph RBD driver") |
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.
Same suggestion as below
logger.Info("successfully started CSI Ceph RBD driver") | |
logger.Info("successfully started CSI Ceph RBD provisioner") |
log the successful message about starting CSIDriver after creating the daemonset and deployment objects. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
remove csiDriver and csiClient variables creation and reuse them from the method receivers. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
8419024
to
d246dde
Compare
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.
Were you able to repro before the fix, or this is based on the stack trace?
Reproduced and tested the fix |
ceph: fix panic when recreating the csidriver object (backport #8582)
ceph: fix panic when recreating the csidriver object (backport #8582)
Description of your changes:
This PR fixes the below items
Initialize the client and the csidriver object before calling the reCreateCSIDriverInfo function.
reuse already defined csiDriver object instead of referring to the method receiver
log the successful message about starting CSIDriver after creating the daemonset and deployment objects.
Signed-off-by: Madhu Rajanna madhupr007@gmail.com
Note: the issue was reported at slack https://rook-io.slack.com/archives/CK9CF5H2R/p1629776387282600
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
make codegen
) has been run to update object specifications, if necessary.