hashicorp/terraform-aws-consul

Feature request: install-dnsmasq - remove requirement for reboot

Closed this issue · 3 comments

I wondered why during recent testing in Amazon Linux 2 (cloud9) for the last 2 days why I couldn't find consul hostnames via dig.
...And then I found that I had to reboot the instance after installing dnsmasq, which is odd that I'd never noticed this before, but it was totally required. I just didn't realise because I was testing from scratch each time (new pattern).

What changes would need to be made for the installer to restart whatever required services are needed to avoid reboot?

We recommend using the installer in a Packer template. The resulting AMI isn't used until you launch an EC2 instance with it, so the reboot is effectively built in. Adding reboot to the script isn't necessary in this case, and may even cause issues in the Packer build.

Whoops, hit "Comment" too soon. To continue:

If you are using the script in some other pattern, then you should probably build the reboot into your own flow.

Is it possible to avoid reboot altogether? I tried resetting the dnsmasq service, but I must be missing something else. The reason why I ask is when using cloud9, some workflows wont allow use of your own AMI, but this can prevent turnkey approaches from succeeding.