Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing log options doesn't restart container #985

Open
spuder opened this issue Mar 26, 2018 · 3 comments
Open

Changing log options doesn't restart container #985

spuder opened this issue Mar 26, 2018 · 3 comments

Comments

@spuder
Copy link

spuder commented Mar 26, 2018

Cookbook version

4.1.1

Chef-client version

Chef 12.18.31

Platform Details

Ubuntu 16.04

Scenario:

If you change the 'logging' options it does not reconfigure / restart the container

Steps to Reproduce:

  1. Create a docker container
docker_container 'nginx' do
  action :run
end

Then change the log_driver or log_opts

docker_container 'nginx' do
  log_driver 'splunk'
  log_opts ['splunk-url=foobar.splunk.com:8088', 'splunk-token=123457890', 'splunk-source=docker', 'splunk-sourcetype=foobar']
  action :run
end

Then run chef.
Then run a docker inspect, you will find the 'splunk' logger isn't there

docker inspect nginx | grep splunk

Workaround

Deleting and recreating the container by hand fixes the issue

docker stop nginx
docker rm nginx
chef-client

Looking at docker inspect shows the splunk options now

docker inspect nginx | grep splunk
            "LogConfig": {
                "Type": "splunk",
                "Config": {
                    "splunk-format": "json",
                    "splunk-source": "docker",
                    "splunk-token": "xxxxxxxx",
                    "splunk-url": "https://foobar.example.com:8088"
                }
            },

Expected Result:

Chef should restart the container just like it does if you change any other options (e,g, volumes, labels, tags)

Actual Result:

Chef does not restart or reconfigure the container on any logging changes

@ziprick
Copy link

ziprick commented Jul 25, 2018

Confirmed issue to still be present, exactly as described above, as of July 2018

docker cookbook version: 4.4.0
platform: Ubuntu 16.04
chef-client: 14.3.37

@timorkal
Copy link

Somebody is going to solve it? this is an issue from 2018...

@manuelmazzuola
Copy link

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants