Skip to content

How do you automagically replace nodes in the catalog? #5726

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

Closed
sspreitzer opened this issue Apr 27, 2019 · 3 comments
Closed

How do you automagically replace nodes in the catalog? #5726

sspreitzer opened this issue Apr 27, 2019 · 3 comments

Comments

@sspreitzer
Copy link

sspreitzer commented Apr 27, 2019

Hi there

So here is what I do:

  • Using terraform to spin up nodes, the nodes join my local consul server (dev mode).
  • The node agent runs in a container
  • I destroy and recreate the nodes frequently, the nodes' consul does not unregister
  • I use that to expose the consul catalog to traefik for edge Loadbalancing

What does not work:

  • Consul does not accept a node once i destroyed the old one. It states that there is already a node with that hostname registered under a different node-id

My questions:

  • How can I get this to fly?
  • What am I missing?
  • Why does consul not accept to overwrite the exisiting hostname+node-id combination? Sounds broken to me?

Thanks a lot and kind regards
Sascha

@sspreitzer
Copy link
Author

Ah yes, and -disable-host-node-id does not work in that case.

@sspreitzer
Copy link
Author

As a workaround I added consul force-leave <nodename> in the terraform destroy part.

@pearkes
Copy link
Contributor

pearkes commented May 15, 2019

See also #4741 which has rich set of context on this specific issue that I think will describe the nuance to this type of situation. There was just a fix landed there that will hopefully help address your specific use-case!

@pearkes pearkes closed this as completed May 15, 2019
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

No branches or pull requests

2 participants