-
Notifications
You must be signed in to change notification settings - Fork 547
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
Implement GetFenceClients to return the ceph clusterID and the client Address #4944
Conversation
Test resultsh-5.1# csi-client
Enter the path for the Unix socket: unix:///csi/csi-addons.sock
Using socket path: unix:///csi/csi-addons.sock
Server response: id:"a815fe8e-eabd-4e87-a6e8-78cebfb67d08" addresses:{cidr:"10.244.0.1"}
sh-5.1# cat /sys/devices/rbd/0/
block/ client_id config_info features major name pool pool_ns refresh snap_id uevent
client_addr cluster_fsid current_snap image_id minor parent pool_id power/ size subsystem/
sh-5.1# cat /sys/devices/rbd/0/client_addr
10.244.0.1:0/353261872
sh-5.1# cat /sys/devices/rbd/0/cluster_fsid
a815fe8e-eabd-4e87-a6e8-78cebfb67d08
sh-5.1# wrote a small client to get the details, this is how it looks like |
|
473fe3e
to
2846a98
Compare
added |
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.
Cephfs nodeplugin needs this NF server too ?
This is only for rbd now, we will extend it to cephfs later on if required. |
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.
Thanks,
LGTM
@Mergifyio rebase |
updating csi-addons spec to the latest main which GetFenceClients API. Signed-off-by: Madhu Rajanna <[email protected]>
register Capability_NetworkFence_ GET_CLIENTS_TO_FENCE capability and start a NetworkFence controllers as part of rbd nodeplugin. Signed-off-by: Madhu Rajanna <[email protected]>
updating go-ceph to the latest commit to pull the new function to get client address Signed-off-by: Madhu Rajanna <[email protected]>
added GetAddrs to get the client Adress of the rados connection which is helpful for NetworkFencing Signed-off-by: Madhu Rajanna <[email protected]>
implemented GetFenceClients which connects to the ceph cluster and returns the ceph clusterID and the clientaddress that is used for rados connection. Signed-off-by: Madhu Rajanna <[email protected]>
The address we get from ceph contains the ip in the format of 10.244.0.1:0/2686266785 we need to extract the client IP from this address, we already have a helper to extract it, This makes the helper more generic can be reused by multiple packages in the fence controller. Signed-off-by: Madhu Rajanna <[email protected]>
2846a98
to
828c041
Compare
✅ Branch has been successfully rebased |
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at b4592a5 |
/test ci/centos/k8s-e2e-external-storage/1.31 |
/test ci/centos/mini-e2e-helm/k8s-1.31 |
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/mini-e2e/k8s-1.31 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/k8s-e2e-external-storage/1.30 |
/test ci/centos/mini-e2e/k8s-1.29 |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/mini-e2e-helm/k8s-1.30 |
/test ci/centos/mini-e2e/k8s-1.30 |
I'm getting this error when trying to run the E2E. I assume
|
The error seems to be coming from go-ceph. can you please specify which exact command is failing. https://docs.ceph.com/en/pacific/rados/api/librados/#c.rados_getaddrs is supported in older version as well. its not something new |
This PR implements a csiaddons RPC calls to return the ceph fsID and the client IP that is used to connect to the ceph cluster from the rbd plugin daemonset pod.
closes: #4913