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

feat(cluster_mgr): Add support for remote Dragonfly servers #2671

Merged
merged 8 commits into from
Feb 29, 2024

Conversation

chakaz
Copy link
Collaborator

@chakaz chakaz commented Feb 28, 2024

This PR introduces support for remote Dragonfly server cluster management via cluster_mgr.py.

Also, I updated and extended --help with examples and explanation on how to set up a cluster.

As part of this PR I also enable DFLYCLUSTER commands via the regular (non-admin) port.

@chakaz chakaz requested a review from romange February 28, 2024 13:09
target = find_node(config, args.target_port)
target_node = Node(target["master"]["port"])
target = find_node(config, args.target_host, args.target_port)
target_node = Node(target["master"]["ip"], target["master"]["port"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe insert update_id in Node construction?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's unfortunately not possible because in create_locally we first create the node, and then start it. I could refactor some code I guess but I don't think it's worth it.
But I did move it to be a method instead of a free standing function :)

`--target_host` and `--target_port`

To set up a new cluster - start the servers and then use
./cluster_mgr.py --action=config_single_remote ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

I want to discuss the api here to build the remote cluster but this is working now and its ok for the demo so LGTM

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure.. let's discuss when you're free :)
But can I haz approval?

@chakaz chakaz merged commit 54cb7d5 into main Feb 29, 2024
10 checks passed
@chakaz chakaz deleted the cluster-mgr-remote branch February 29, 2024 09:59
romange pushed a commit that referenced this pull request Mar 1, 2024
* WIP: `cluster_mgr.py` to work with remote targets

* Documentation

* No admin port

* Support different hostname move/migrate

* Fix migrate bug

* Fix typo in --help

* fix test

* self.update_id()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants