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

controller: fix csiaddonsnodes object deletion #247

Merged
merged 1 commit into from
Oct 7, 2022

Conversation

Madhu-1
Copy link
Member

@Madhu-1 Madhu-1 commented Oct 7, 2022

resolveEndpoint get the pod object to resolve the ip address as the pod object is deleted resolveEndpoint will fail to get the pod and it blocks the csiaddonsnodes object from getting deleted because of this logs will get flooded and other csiaddons operation might also fail.

To fix this problem call resolveEndpoint only if the csiaddonsnodes object is not deleted.

Signed-off-by: Madhu Rajanna [email protected]

resolveEndpoint get the pod object to resolve
the ip address as the pod object is deleted
resolveEndpoint will fail to get the pod and
it blocks the csiaddonsnodes object from getting
deleted because of this logs will get flooded
and other csiaddons operation might also fail.

To fix this problem call resolveEndpoint only
if the csiaddonsnodes object is not deleted.

Signed-off-by: Madhu Rajanna <[email protected]>
@nixpanic nixpanic added the bug Something isn't working label Oct 7, 2022
@nixpanic
Copy link
Collaborator

nixpanic commented Oct 7, 2022

Looks good to me. Just needs manual testing at the moment, so please report back once done.

@Madhu-1
Copy link
Member Author

Madhu-1 commented Oct 7, 2022

[🎩︎]mrajanna@fedora ceph-csi $]kubectl get csiaddonsnodes -nrook-ceph
NAME                                         NAMESPACE   AGE     DRIVERNAME                   ENDPOINT                                                          NODEID
csi-rbdplugin-provisioner-564d599ff9-tzrfd   rook-ceph   7m7s    rook-ceph.rbd.csi.ceph.com   pod://csi-rbdplugin-provisioner-564d599ff9-tzrfd.rook-ceph:9070   minikube
csi-rbdplugin-vgdmh                          rook-ceph   7m49s   rook-ceph.rbd.csi.ceph.com   pod://csi-rbdplugin-vgdmh.rook-ceph:9070                          minikube
[🎩︎]mrajanna@fedora ceph-csi $]
[🎩︎]mrajanna@fedora ceph-csi $]kuberc get po
NAME                                         READY   STATUS      RESTARTS   AGE
csi-rbdplugin-provisioner-564d599ff9-tzrfd   6/6     Running     0          7m20s
csi-rbdplugin-vgdmh                          3/3     Running     0          10m
rook-ceph-mds-myfs-a-5cbfd6b469-dvxmm        1/1     Running     0          8m20s
rook-ceph-mds-myfs-b-5547585845-cgrcs        1/1     Running     0          8m19s
rook-ceph-mgr-a-58f5c6dc7c-nzzxl             1/1     Running     0          8m59s
rook-ceph-mon-a-6c84dbcf58-gnfww             1/1     Running     0          9m24s
rook-ceph-operator-7bd59d5dbf-md28b          1/1     Running     0          11m
rook-ceph-osd-0-6f9dc6d97b-j4nf5             1/1     Running     0          8m29s
rook-ceph-osd-prepare-minikube-vghnv         0/1     Completed   0          8m4s
rook-ceph-tools-79bc54b8d8-rw8mw             1/1     Running     0          11m
[🎩︎]mrajanna@fedora ceph-csi $]kuberc delete po/csi-rbdplugin-provisioner-564d599ff9-tzrfd
pod "csi-rbdplugin-provisioner-564d599ff9-tzrfd" deleted
[🎩︎]mrajanna@fedora ceph-csi $]kuberc  get csiaddonsnodes -nrook-ceph
NAME                                         NAMESPACE   AGE     DRIVERNAME                   ENDPOINT                                                          NODEID
csi-rbdplugin-provisioner-564d599ff9-pmqcm   rook-ceph   4s      rook-ceph.rbd.csi.ceph.com   pod://csi-rbdplugin-provisioner-564d599ff9-pmqcm.rook-ceph:9070   minikube
csi-rbdplugin-vgdmh                          rook-ceph   8m13s   rook-ceph.rbd.csi.ceph.com   pod://csi-rbdplugin-vgdmh.rook-ceph:9070                          minikube
[🎩︎]mrajanna@fedora ceph-csi $]kuberc get po
NAME                                         READY   STATUS      RESTARTS   AGE
csi-rbdplugin-provisioner-564d599ff9-pmqcm   6/6     Running     0          15s
csi-rbdplugin-vgdmh                          3/3     Running     0          10m
rook-ceph-mds-myfs-a-5cbfd6b469-dvxmm        1/1     Running     0          8m42s
rook-ceph-mds-myfs-b-5547585845-cgrcs        1/1     Running     0          8m41s
rook-ceph-mgr-a-58f5c6dc7c-nzzxl             1/1     Running     0          9m21s
rook-ceph-mon-a-6c84dbcf58-gnfww             1/1     Running     0          9m46s
rook-ceph-operator-7bd59d5dbf-md28b          1/1     Running     0          11m
rook-ceph-osd-0-6f9dc6d97b-j4nf5             1/1     Running     0          8m51s
rook-ceph-osd-prepare-minikube-vghnv         0/1     Completed   0          8m26s
rook-ceph-tools-79bc54b8d8-rw8mw             1/1     Running     0          11m
[🎩︎]mrajanna@fedora ceph-csi $]

@Madhu-1
Copy link
Member Author

Madhu-1 commented Oct 7, 2022

Tested works as expected

@mergify mergify bot merged commit 08d7a49 into csi-addons:main Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants