Changing the datacenter name in a running consul cluster

2,253 views
Skip to first unread message

mg

unread,
Feb 26, 2016, 5:23:05 PM2/26/16
to Consul
Hi

I have a running consul server cluster with bootstrap-expect of 3 and datacenter name = dc1

I needed to change datacenter value form dc1 to dc2, I stopped all the server members and changed the consul.json and updated the datacenter value to dc2.

Now, the cluster does not form ... what am I missing or doing wrong here?


regards

James Phillips

unread,
Mar 10, 2016, 1:48:38 AM3/10/16
to consu...@googlegroups.com
Hi mg,

Can you provide a little more detail on what's happening, maybe a gist with some log output? Thanks!

-- James

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/f77f0671-e340-4f0c-859b-fa577ab83c5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

mg

unread,
Mar 10, 2016, 7:26:11 PM3/10/16
to Consul
Hi James,

Sorry I cant provide any info as of now, when it happened we were in crisis mode to get it up and got it working.
Its working now, but I will try to recreate the problem in a non prod env and let you know.

Thanx

James Phillips

unread,
Mar 10, 2016, 7:31:55 PM3/10/16
to consu...@googlegroups.com
Sorry about that - there are some features in Consul to try to avoid merging different gossip pools but if you changed everything at once it doesn't seem like that should apply. It would be interesting to see what your procedure was and what happened so we can make this better with code, or at least document the procedure for renaming a DC.

mg

unread,
Mar 17, 2016, 4:52:12 PM3/17/16
to Consul
Hi James,

Doing a dc name change.

Once a dc name is changed in consul.json and the servers restarted, any information in consul viz-a-viz the services, acls, keys , etc are not available.

Consul itslef is in unusable state.

Before changing dc, I rm -rf the contents of /var/lib/consul and then restart consul servers ..... i.e. almost like bootstrapped a brand spanking new cluster ...

Then and only then did consul start working ...

Now with that said, the ui is still not showing the acls page even after I set in the settings tab.

Thats the problem Im still facing

If you know of a better way to do change the dc name and make consul work as is, let me know

Regards

James Phillips

unread,
Mar 21, 2016, 7:28:08 PM3/21/16
to consu...@googlegroups.com
I opened up https://github.com/hashicorp/consul/issues/1858 to capture writing up a procedure for renaming a DC.

The ACL page requires a management token - it sounds like possibly you haven't set one of those, or that your ACLs are not configured properly. Is there anything in your Consul logs when you try to access the ACLs page?

-- James

Reply all
Reply to author
Forward
0 new messages