hashicorp / terraform-aws-consul

A Terraform Module for how to run Consul on AWS using Terraform and Packer
Apache License 2.0
401 stars 484 forks source link

Supervisor restart policy restart consul on graceful leave command #108

Closed coryflucas closed 5 years ago

coryflucas commented 5 years ago

The supervisor configuration currently has a restart policy of true which always restarts the child process if it stops. Using the graceful leave API as mentioned in the documentation on performing updates causes the agent to leave and then shutdown, but supervisor currently restarts it immediately. This causes the agent to re-join the cluster, thus making a graceful shutdown impossible without access to stop supervisor itself.