我使用命令重新安装了garethr-docker repo
puppet module install garethr/docker.
我正在运行的puppet nodes.pp非常简单:
include 'docker'
日志看起来像是正确初始化conf;但是,它无法重新安排服务。请参阅下面的日志
debug: /Stage[main]/Docker::Service/File[/etc/init/docker.conf]/content: Executing 'diff -u /etc/init/docker.conf /tmp/puppet-file20140305-9166-j634yb-0'
notice: /Stage[main]/Docker::Service/File[/etc/init/docker.conf]/content:
--- /etc/init/docker.conf 2014-03-05 18:00:12.141549000 +0000
+++ /tmp/puppet-file20140305-9166-j634yb-0 2014-03-05 18:08:46.997549000 +0000
@@ -6,6 +6,6 @@
respawn
script
- /usr/bin/docker -d -g /dap-home/docker -H unix:///var/run/docker.sock
+ /usr/bin/docker -d -H unix:///var/run/docker.sock
end script
debug: Finishing transaction 70136334948320
info: FileBucket got a duplicate file {md5}35cd6455aae3a3bc020b4db1e9839271
info: /Stage[main]/Docker::Service/File[/etc/init/docker.conf]: Filebucketed /etc/init/docker.conf to puppet with sum 35cd6455aae3a3bc020b4db1e9839271
notice: /Stage[main]/Docker::Service/File[/etc/init/docker.conf]/content: content changed '{md5}35cd6455aae3a3bc020b4db1e9839271' to '{md5}e6ce3c01ccf99456fc57176f1895f808'
info: /Stage[main]/Docker::Service/File[/etc/init/docker.conf]: Scheduling refresh of Service[docker]
debug: /Stage[main]/Docker::Service/File[/etc/init/docker.conf]: The container Class[Docker::Service] will propagate my refresh event
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/status docker'
debug: Puppet::Type::Service::ProviderUpstart: Executing '/sbin/initctl --version'
err: /Stage[main]/Docker::Service/Service[docker]: Could not evaluate: undefined method `[]' for nil:NilClass
应该注意(并不是真的很重要),他正在安装Docker的机器实际上是一个Docker容器。作为puppet代理的容器正在使用-privileged。
运行