Skip to content

Question: the relationship between docker::image and docker::run #479

Closed
@f4rx

Description

@f4rx

I have manifest:

  docker::image { 'f3ex/some-content-nginx':
    ensure => 'latest',
    image_tag => '1',
  } ~>
  docker::run { 'my-nginx':
    image            => 'f3ex/some-content-nginx:1',
  }

Expectation: to update/restart a running container on getting a new image.
In the currently: restarting a container on every puppet agent execution.

Notice: /Stage[main]/Prometheus_node::Alertmanager/Docker::Image[f3ex/some-content-nginx]/Notify[Check if image f3ex/some-content-nginx:1 is in-sync]/message: defined 'message' as 'Check if image f3ex/some-content-nginx:1 is in-sync'
Info: /Stage[main]/Prometheus_node::Alertmanager/Docker::Image[f3ex/some-content-nginx]/Notify[Check if image f3ex/some-content-nginx:1 is in-sync]: Scheduling refresh of Exec[echo 'Update of f3ex/some-content-nginx:1 complete']
Notice: /Stage[main]/Prometheus_node::Alertmanager/Docker::Image[f3ex/some-content-nginx]/Exec[echo 'Update of f3ex/some-content-nginx:1 complete']: Triggered 'refresh' from 1 event
Info: Docker::Image[f3ex/some-content-nginx]: Scheduling refresh of Docker::Run[my-nginx]
Info: Docker::Run[my-nginx]: Scheduling refresh of Service[docker-my-nginx]
Info: Docker::Run[my-nginx]: Scheduling refresh of Exec[docker-my-nginx-systemd-reload]
Notice: /Stage[main]/Prometheus_node::Alertmanager/Docker::Run[my-nginx]/Exec[docker-my-nginx-systemd-reload]: Triggered 'refresh' from 1 event
Notice: /Stage[main]/Prometheus_node::Alertmanager/Docker::Run[my-nginx]/Service[docker-my-nginx]: Triggered 'refresh' from 1 event

Cause - the 'exec', that running on every execution:

    notify { "Check if image ${image_arg} is in-sync":
      noop      => false,
    }
    ~>
    exec { "echo 'Update of ${image_arg} complete'":

The changes were made in this issue #316

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions