Skip to content

Allow to not restart consul when updating the binary #650

@gmenuel

Description

@gmenuel

After updating the consul binary, the module will notify the service in order to restart consul. Unfortunately when doing this, it seems complicated to follow the consul upgrade documentation https://developer.hashicorp.com/consul/docs/upgrading/instructions/general-process#perform-the-upgrade which specify an order for restarting consul servers and clients.

In order to comply with the consul documentation I wanted to upgrade the binary with the consul puppet module, but only restart consul either manually or with a set of scripts which would check the versions of the other nodes. I'm curious as how other people handle this update process, and I think an option should be added to bypass the notify when the version is changed.

How to reproduce (e.g Puppet code you use)

Change the consul::version to a newer version than the one currently installed.

What are you seeing

Notice: /Stage[main]/Consul::Install/File[/usr/local/bin/consul]/target: target changed '/var/consul/archives/consul-1.7.1/consul' to '/var/consul/archives/consul-1.7.0/consul'
Info: /Stage[main]/Consul::Install/File[/usr/local/bin/consul]: Scheduling refresh of Class[Consul::Run_service]
Info: Class[Consul::Run_service]: Scheduling refresh of Service[consul]
Notice: /Stage[main]/Consul::Run_service/Service[consul]: Triggered 'refresh' from 1 event

What behaviour did you expect instead

Having the option to not restart the service.

Output log

Any additional information you'd like to impart

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions