Comments (12)
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 addedendAfter 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.
Yes, upstart init_type.
I'll try it again tomorrow w/ debug level logging.
from docker.
Is this still an issue? Thanks.
from docker.
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.
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.
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.
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.
@cap10morgan is this still an issue?
from docker.
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.
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.
:restart with upstart is borked, but maybe I've a fix.
from docker.
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)
- (debian-9, installation-script-main) is no longer a valid test HOT 1
- Changelog weirdness
- Containers with embedded health checks restart on every Chef run
- Logging drivers are out of sync
- Can't stop updates to /lib/systemd/system/docker.service
- README.md is missing resources / broken links
- Setting a version causes a service restart on every run HOT 4
- docker_installation_tarball group is always reset HOT 1
- Wrong source list generation for Debian 11 HOT 8
- Use docker_image resource with build_if_missing action with buildkit
- Invalid filter 'dangling=[docker_image_prune[cleanup]]'
- docker Chef 18 compatibility HOT 7
- docker-ce package name in ubuntu 22.04 is in a different format that affects module 'docker_installation_package' HOT 1
- Can't start a simple container
- Dependency Dashboard
- docker_volume_prune resource
- Unable to use `package_name`-property of the `docker_service`-resource
- PR #1253 is a breaking change. Break on CentOS 7 (Old kernel without cgroup v2)
- ipv6 forwarding prevents the daemon to run when ipv6 is disabled in kernel
- docker_container network_mode "container:*" leads to redeploy on every chef client run
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.