Repository navigation
Conversation
This would allow file system peers (for mirroring) to be added by specifying remote clusters monitor address instead of copying remote clusters ceph config file. Signed-off-by: Venky Shankar <[email protected]>
Signed-off-by: Venky Shankar <[email protected]>
…ied) This allows connecting to the peer cluster without having the cluster configuration file on the primary cluster. Signed-off-by: Venky Shankar <[email protected]>
Signed-off-by: Venky Shankar <[email protected]>
04343da to
6069f9e
Compare
batrick
left a comment
There was a problem hiding this comment.
I spoke with Sage and Jason about this earlier today. The way rbd-mirror does this is by storing the mon_host and secret in the mon config-key store [1]. I would suggest we should go in that direction as we can maintain the same model for configuration to be consistent. rbd-mirror uses a mon 'profile rbd-mirror' authorization to allow access to the config keys for the secret/mon_host. We can have the exact same setup for cephfs-mirror.
Storing the mon_host in the config-key store is not as necessary since you could safely store that in the FSMap but it would be consistent with rbd-mirror. If you want to just store the secret in the config-key store, I'm okay with that.
(There is also an rbd-mirror-peer profile but I'm not sure what that's for. @dillaman ? It's not mentioned in the docs for rbd-mirror.)
[1] https://docs.ceph.com/en/latest/rbd/rbd-mirroring/#add-cluster-peer-manually
[2] https://docs.ceph.com/en/latest/rbd/rbd-mirroring/#rbd-mirror-daemon
It's used by automatic bootstrap process [1] internally to allow the remote peer (i.e. site-A) to install its own secret keys in the peer cluster's (i.e. site-b) config-key store. |
|
... as I also mentioned, librbd's new instant-image restore feature supports using |
Nice! Maybe we should store that URI in the FSMap then. |
ACK. Nice approach. |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
Peer cluster monitor host is tracked in FSMap::ClusterInfo. Mirror daemons can connect to the peer cluster without the need for the peer cluster configuration file to be present in the primary site. librados searches for keyring in default locations.
pybing/mirroring needs to connect to the remote cluster when adding a peer. This is to set a special xattr (on root) to "mark" the remote filesystem as a peer. This is done so that a "peered" filesystem cannot be added as a peer again from another cluster. However, librados python binding does not seem to search for keyrings in default locations as mentioned in https://docs.ceph.com/en/latest/rados/api/python/#connect-to-the-cluster thereby failing the connect (see changes in src/pybind/mgr/mirroring/fs/utils.py in this PR). Specifying the path to keyring file (or accepting it from the user) does not look clean too.
@batrick @liewegas @mchangir ^^
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox