-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Adds node ID integrity checking to the catalog and the LAN and WAN clusters. #2832
Conversation
Working through some test fallout from this, not quite ready for merge. |
consul/state/catalog.go
Outdated
} | ||
if existing != nil { | ||
n = existing.(*structs.Node) | ||
fmt.Printf("XXX %#v\n", *n) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^^ ?
Also, q.Q()
> fmt.Printf()
😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol good catch!
Ended up removing the leader_test.go server address change test as part of this. The join was failing becase we were using a new node name with the new logic here, but realized this was hitting some of the memberlist conflict logic and not working as we expected. We need some additional work to fully support address changes, so removed the test for now.
I'm working on upgrading to 0.8.0 and I'm testing by spinning up 3 centos docker containers running docker-in-docker (on Docker Mac), and then each launching the consul container. What's odd is that all 3 nodes appear to come up with the same Node ID which is causing them all to throw errors and fail to join the cluster. Here is my config:
Here are some of the logs showing the errors:
I'm guessing it's something to do with this commit but I could be wrong. Any help would be appreciated. |
Hi @micahlmartin please take a look at the discussion on #2877. You can set the node ID to something unique by adding something like |
@slackpad That fixed it. Thanks for the quick response. |
@slackpad that's a neat idea, but it doesn't work with Kubernetes pods because there seems to be no support for command substitution. I'd like to run Consul in Kubernetes but I can't upgrade to 0.8.0 right now, because of this issue. Do you have any suggestion how to ensure Consul gets a new node-id each time the container restarts? Of course I could just build my own consul docker image where I first fill an env variable with a uuid but I was hoping to just use the vanilla images. I'd be happy to test a few things, if you have any ideas. 👍 |
@dictvm please take a look at #2877 (comment), that's probably the easiest solution for folks running containers. Do you think that would fix your particular issue with k8s? |
@slackpad I'm pretty sure it would, thanks! |
Since node ID integrity is critical for the 0.8 Raft features, we need to ensure that node IDs are unique. We also add integrity checking for the catalog so we can start relying on node IDs there in future versions of Consul.