saltstack-formulas / docker-formula

Install and set up Docker
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
136 stars 330 forks source link

fix(service): reload the docker service when daemon.json has changed #289

Closed danny-smit closed 3 years ago

danny-smit commented 3 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Follow up of https://github.com/saltstack-formulas/docker-formula/pull/282

Describe the changes you're proposing

Ensure that the docker daemon is reloaded when changes are applied to the daemon.json.

Pillar / config required to test the proposed changes

docker:
  pkg:
    docker:
      daemon_config:
        insecure-registries:
          - dockerhost.test.home:443

Debug log showing how the proposed changes work

The 'watch' added to the 'service.running' state causes the service to be restarted:

          ID: docker-software-service-running-docker
    Function: service.running
        Name: docker
      Result: True
     Comment: Service restarted
     Started: 13:55:09.038487
    Duration: 466.054 ms
     Changes:   
              ----------
              docker:
                  True

Documentation checklist

Testing checklist

Additional context

Current tests execute a clean installation. The problem occurs when salt runs a second time with configuration changes for the daemon.json. It is difficult to get this included in the tests.

danny-smit commented 3 years ago

@noelmcloughlin Thanks for reviewing @noelmcloughlin and @myii What is the correct procedure to get this pull request merged?

noelmcloughlin commented 3 years ago

I just wait a day or two for any objections - or someone else to take initiative in merging. Happy to merge now!!

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 2.0.6 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

danny-smit commented 3 years ago

@noelmcloughlin Thanks for explaining and merging!