You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
Previous to this change, we've avoided hashicorp/nomad#10058 by adding a long
sleep before attache-control would otherwise exit successfully. Unfortunately
this still means that subsequent scaling deployments will fail if the sleep
incurred from the initial deployment has expired.
This change makes attache-control a proper sidecar (long running ephemeral
post-start task). Instead of exiting after a successful run, attache-control
will stop the ticker channel and continue running until it receives a kill
signal.
- Configure attache-control as a side-car in the example nomad job
- Remove attempt-limit flag and cliOpts.attemptLimit
- Split the main func of attache-control into helpers
- Add helper methods to scalingOpts
- Replace calls to time.Tick with time.NewTicker
- Add renewChan (chan struct{}) and acquired (bool) to the lock struct
- lock.Acquire() sets lock.acquired to true, initializes lock.renewChan, and calls
lock.periodicallyRenew() in a long-running go-routine
- lock.Cleanup() closes lock.renewChan and sets lock.acquired to false
Fixes#6
Part Of #11
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Cleaning up these nested loops will make it easier to reason about the code.
The text was updated successfully, but these errors were encountered: