-
Notifications
You must be signed in to change notification settings - Fork 545
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
Open
Madhu-1
wants to merge
6
commits into
ceph:devel
Choose a base branch
from
Madhu-1:implement-get_client_ip
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updating csi-addons spec to the latest main which GetFenceClients API. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
register Capability_NetworkFence_ GET_CLIENTS_TO_FENCE capability and start a NetworkFence controllers as part of rbd nodeplugin. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
updating go-ceph to the latest commit to pull the new function to get client address Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
added GetAddrs to get the client Adress of the rados connection which is helpful for NetworkFencing Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
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 <madhupr007@gmail.com>
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 |
|
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 <madhupr007@gmail.com>
Madhu-1
force-pushed
the
implement-get_client_ip
branch
from
November 5, 2024 17:55
473fe3e
to
2846a98
Compare
added |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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