Skip to content
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

Consul Service Advertisement Refactor #2478

Closed
schmichael opened this issue Mar 24, 2017 · 3 comments
Closed

Consul Service Advertisement Refactor #2478

schmichael opened this issue Mar 24, 2017 · 3 comments

Comments

@schmichael
Copy link
Member

schmichael commented Mar 24, 2017

There have been enough issues related to this work I wanted to create an issue to link them all *
together.

Branch: https://github.com/hashicorp/nomad/tree/f-consul-refactor

The existing (0.5.5 and before) Consul service advertisement code has the following properties:

  • Runs in the task executor so checks are updated even if the Nomad agent is down.
  • Designed as a reconciliation loop to ensure Consul is consistent with Nomad (eg reaps orphaned Consul entries periodically)

This has the following issues:

The goal of the Consul refactor is to address these issues by doing the following:

  • Add/remove services/checks as appropriate. No periodic reconciliation.
  • Move all Consul interaction into the Nomad client agent - not the task executor.
    • The one downside to this is that if the Nomad agent is down for longer than a script check's interval, the script check will not be run and the service's health in Consul will not be accurate.
@schmichael schmichael added this to the v0.6.0 milestone Mar 24, 2017
@schmichael schmichael self-assigned this Mar 24, 2017
schmichael added a commit that referenced this issue Mar 30, 2017
Fixes #2478 #2474 #1995 #2294

The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.

The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.

Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.

Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
schmichael added a commit that referenced this issue Apr 19, 2017
Fixes #2478 #2474 #1995 #2294

The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.

The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.

Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.

Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
@schmichael
Copy link
Member Author

Reopening until #2554 lands.

@schmichael
Copy link
Member Author

#2554 landed ages ago; not sure why I haven't closed this yet. :)

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant