Setting and Changing locality

Is it possible to change or set the locality of a node without first stopping the node and restarting it with the locality option? For example, live storage vmotion the server from rack A to rack C (so it moves with no down time), or adding a level of detail, such a country or rack and previously only having datacenter specified.

Not currently. However stopping and restarting a node should be a relatively painless procedure and if you’re only doing this to one node at a time and starting it back up fairly quickly, it shouldn’t produce any downtime for the cluster as a whole.

Restarting is painless enough, but the shutdown takes awhile. Most of the time after doing a cockroach quit, I have to killall cockroach two more times before I can start it back up. I probably could wait instead of doing killall, but it always seems to take longer than it should, but figure that’s a different issue…

The hanging shutdown should be fixed in the next release.

When quitting, a node goes through a number of steps to tell the cluster
that it is going offline. If this is too slow, or doesn’t finish, could
you file an issue with the details? Two kills seems excessive.

I don’t see us making these values settable while a node is up anytime
soon. Since messing around your network topology is not a normal
day-to-day operation. But feel free to file an issue with your use case and
we’ll take a look.