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

Extend support for ctdb cluster meta stored in ceph rados #123

Merged
merged 8 commits into from
Jun 28, 2024

Conversation

phlogistonjohn
Copy link
Collaborator

@phlogistonjohn phlogistonjohn commented Jun 24, 2024

Depends on #122

Add support to rados module to implement the ClusterMeta protocol.
Add rados support to sambacc ctdb commands.
Add a helpful CLI option for getting node number from env (it's a bit unrelated to the rados focus of the other changes but I didn't want to file a whole PR just for that).

Copy link

dpulls bot commented Jun 26, 2024

🎉 All dependencies have been resolved !

Copy link

mergify bot commented Jun 26, 2024

This pull request now has conflicts with the target branch. Please resolve these conflicts and force push the updated branch.

Previously, the class name was "private" and only expected to be used
indirectly through the opener infrastructure. Future changes will make
it possible to write "open" objects, lock them, etc. Prepare for that
by making the class "public" and cleaning up the basic interface a bit.

Signed-off-by: John Mulligan <[email protected]>
These will be used later to support cluster meta stored in rados.

Signed-off-by: John Mulligan <[email protected]>
Add a method for getting a RADOSObjectRef based on a uri-like string,
similar to the `rados_open` method that exists to support the urllib
functionality. This includes a small refactor of the uri/url parsing
so that it can be shared for both `get_object` and `rados_open`.
Note that get_object advertises returning RADOSObjectRef so that
special specific-to-rados APIs can be used easily.

Signed-off-by: John Mulligan <[email protected]>
Add classes for the rados module to provide support for the ctdb module
ClusterMeta protocols. The create_from_uri classmethod should be used
to instantiate the new object as it hides the private _RADOSHandler
type from other modules.

Signed-off-by: John Mulligan <[email protected]>
Add `is_rados_uri` that will return true if a uri string containes a
rados-specific scheme.

Signed-off-by: John Mulligan <[email protected]>
Rename the `enable_rados_url_opener` to the more general `enable_rados`
to reflect that calling this function enables rados support in sambacc
not just sambacc's urlopener hooks.

Signed-off-by: John Mulligan <[email protected]>
Add code to the ctdb related commands in sambacc to enable using a rados
object as a cluster metatadata object.

Signed-off-by: John Mulligan <[email protected]>
Add a command line argument that tells sambacc to source the ctdb node
number from an environment variable.

Signed-off-by: John Mulligan <[email protected]>
@phlogistonjohn phlogistonjohn marked this pull request as ready for review June 26, 2024 15:36
@phlogistonjohn
Copy link
Collaborator Author

cc @avanthakkar

Copy link
Collaborator

@synarete synarete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@anoopcs9 anoopcs9 changed the title Extend support for ctdb cluste rmeta stored in ceph rados Extend support for ctdb cluster meta stored in ceph rados Jun 28, 2024
Copy link
Collaborator

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The very last commit stands out. Shall we save commands: support acquiring a node number from the environment for a later PR which could be more related?

Copy link
Collaborator

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The very last commit stands out. Shall we save commands: support acquiring a node number from the environment for a later PR which could be more related?

Ah.. I should have looked at PR description in detail 😉 .

@mergify mergify bot merged commit bc34f14 into samba-in-kubernetes:master Jun 28, 2024
9 checks passed
@phlogistonjohn phlogistonjohn deleted the jjm-rados-ctdb branch June 29, 2024 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants