Coder Social home page Coder Social logo

Comments (12)

bflad avatar bflad commented on June 9, 2024

I'm presuming the init_type is upstart from your other ticket. I wonder if
its related to other Upstart issues I've seen where a full stop and start
is required? Does debug output show it calling the underlying service
restart?

On Tue, Jan 28, 2014 at 4:17 PM, Wes Morgan [email protected]:

I added a restart notification to the template resource that creates a
config file one of my containers relies on. The whole template &
docker_container resources look like this:

docker_container 'registry' do
detach true
port '5000:5000'
env ['SETTINGS_FLAVOR=prod']
volume ['/mnt/docker-registry-storage:/tmp/registry', '/mnt/docker-registry-config:/docker-registry/config']end
template "/mnt/docker-registry-config/config.yml" do
owner "root"
group "docker"
mode "664"
action :create
source "docker-registry-config.yml.erb"
variables :config => {
:loglevel => "debug",
:storage => "local",
:storage_path => "/tmp/registry",
:secret_key => Chef::EncryptedDataBagItem.load("secrets", "docker_registry")["secret_key"]
}
notifies :restart, "docker_container[registry]" # <--- what I addedend

After updating the template, I saw

Recipe: base::docker

  • docker_container[registry] action restart

in the Chef output, but the changes didn't take effect until I manually
stopped and re-ran the registry container.

Reply to this email directly or view it on GitHubhttps://github.com//issues/50
.

Brian Flad
http://about.me/bflad

from docker.

cap10morgan avatar cap10morgan commented on June 9, 2024

Yes, upstart init_type.

I'll try it again tomorrow w/ debug level logging.

from docker.

bflad avatar bflad commented on June 9, 2024

Is this still an issue? Thanks.

from docker.

JeanMertz avatar JeanMertz commented on June 9, 2024

I just ran into this today. Haven't investigated it yet, but just wanted to let you know that it stil seems to be an issue in the latest version of the cookbook.

from docker.

bflad avatar bflad commented on June 9, 2024

Good to know. I'd try doing two separate notifies (stop and start) for debugging to see if they fire or not. Otherwise, I'd love if we could have a test case that could fail until we fix it.

from docker.

StFS avatar StFS commented on June 9, 2024

I'm not sure if I'm running into the same problem but on my installation on CentOS, docker seems to be a little "borked" after installing via this recipe. On a clean CentOS server, installing docker only (no containers) I get an error stating that the docker daemon isn't running. It isn't until I do a full manual restart (can't remember if restart works or if I have to do a stop and then a start or even reboot the machine). Do you think this is the same issue or should I file a new one (in which I'll provide better analysis of what actually happens)?

from docker.

bflad avatar bflad commented on June 9, 2024

This sounds similar to #162. I would love to see the docker logs, if a restart fixes it, and if anyone has any additional insight. Thanks!

from docker.

tduffield avatar tduffield commented on June 9, 2024

@cap10morgan is this still an issue?

from docker.

fxposter avatar fxposter commented on June 9, 2024

This is still an issue and it is fixed by removing "normal exit 0 CONT" in ubuntu 14.04 (and greater, I suppose)

from docker.

jonapich avatar jonapich commented on June 9, 2024

I have the same problem. When I use a notifies :restart on a container, the container ends up in Exit (137) state and isn't restarted. When using stop followed by start though, it works.

I'm using the Ubuntu 14.04 community image from AWS.

from docker.

gionn avatar gionn commented on June 9, 2024

:restart with upstart is borked, but maybe I've a fix.

from docker.

gionn avatar gionn commented on June 9, 2024

If you want to try PR and test, just copy the template of the referenced PR in your cookbook (where you use docker_container resources), in templates/ and then use something like:

docker_container 'mycontainer' do
    init_template 'docker-container.conf.erb'
    cookbook 'yourcookbook'
end

from docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.