Closed cxmcc closed 1 year ago
Joining a cluster through the webUI would be kind of cool. I'm going to put this in backlog.
We've talked before about being able to do all the CLI operations from a client, and I still think it would be a good idea once we get some breathing room.
I was just thinking joining a cluster is a one time thing thus probably should not be a parameter in command line. And we should probably be able to change which cluster the instance is a part of without restarting db.
We can look into this again after the Raft release. I think it would be neat being able to add servers to a cluster without having to use special command line arguments.
Apparently Riak provides such an option. See https://github.com/rethinkdb/rethinkdb/issues/4488#issue-92483810 for a screenshot and description.
Sad to see there is an existing, really old issue for this. Is dynamically joining a cluster really just not high enough priority to make it in? Is there any way to help bump the priority of this up?
@andyburke We're just finishing up the "Raft release" (RethinkDB 2.1), which changes how servers are managed internally. We wanted to wait for this to not duplicate work.
Generally there doesn't seem to be as much demand for this as for some of the other features, since it's already fairly easy to join a cluster through the --join
command line / configuration option.
Would you mind specifying your scenario a bit more by the way? You mentioned in the other issue that this would be useful for your Docker deployment. Is there anything in particular that makes it difficult to alter the configuration file?
There is a workaround for joining two existing servers together. If you start a third server and instruct it to join both of the existing ones, it will introduce them to each other. You can then shut down the third server since it's no longer needed. If you start the third server in rethinkdb proxy
mode, then it won't even create any data files.
This seems like a great feature, but it would increase the probability of running into #1905. It might be worth fixing that first.
@danielmewes The simplest explanation is this line from my docker file:
CMD [ "rethinkdb", "--bind", "all" ]
I don't want to have to add a --join there pointing to some static ip such that a) I have a bootstrapping problem or b) I have to change my dockerfile if (when) my primary db server changes.
Ideally I could spin up a rethinkdb container and then do:
docker exec rethinkdb-container rethinkdb join <ip of master server>
As described by @timmaxw above, you could do:
docker exec rethinkdb-container rethinkdb proxy --join localhost --join <ip of master server>
Unfortunately you also need to then kill the proxy with ^C
, or if you are scripting the process, add something like & sleep 10; kill $!
I agree it would be nice to have a more straightforward and less error-prone way of doing this.
Another potential solution for @andyburke's use case: better integration with node discovery tools (which we've discussed in #3217), e.g. you could point to etcd to find the cluster.
was this ... actually completed?
No, I presume it was because OP was clearing out 9 year old issues. I'll change the closing reason.
I'm sad. I had a little glimmer of hope. 🤣
We should be able to join/exit a cluster or reconfigure cluster info through the clients, like most databases do.