Checking docker ps doesn't show much helpful:-# Local users may interrogate the ntp server more closely.-restrict 127.0.0.1-restrict ::1-# Clients from this (example!) subnet have unlimited access, but only if-# cryptographically authenticated.-#restrict 192.168.123.0 mask 255.255.255.0 notrust---# If you want to provide time to your local subnet, change the next line.-# (Again, the address is an example only.)-#broadcast 192.168.123.255--# If you want to listen to time broadcasts on your local subnet, de-comment the-# next lines. Please do this only if you trust everybody on the network!-#disable auth-#broadcastclient* execute[Stop ntp in preparation for ntpdate] action run- execute /bin/true* service[ntp] action stop (up to date)
ashdcsbamboo00:~$ docker -H tcp://localhost:5000 psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESffc2cb76a630 24b877679eab "/usr/sbin/sshd -D - 9 days ago Up 9 days 0.0.0.0:49153->22/tcp reverent_feynmanashdcsbamboo00:~$
:/tmp/kitchen# ps awPID TTY STAT TIME COMMAND91 pts/0 Ss+ 0:00 sh -c sudo -E /opt/chef/bin/chef-solo --config /tmp/kitchen/solo.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/ki92 pts/0 S+ 0:00 sudo -E /opt/chef/bin/chef-solo --config /tmp/kitchen/solo.rb --log_level auto --force-formatter --no-color --json-attributes /tmp/kitchen/d93 pts/0 Sl+ 0:01 /opt/chef/embedded/bin/ruby /opt/chef/bin/chef-solo --config /tmp/kitchen/solo.rb --log_level auto --force-formatter --no-color --json-attri98 pts/0 Sl+ 0:06 chef-solo worker: ppid=93;start=21:42:05;427 pts/0 S 0:00 ntpd -q430 ? S 0:00 bash460 ? R+ 0:00 ps aw:/tmp/kitchen#
Is this a known issue with docker containers and the hardware clock? Running the command directly with --debug shows:* execute[Force sync system clock with ntp server] action run- execute ntpd -q* execute[Force sync hardware clock with system clock] action run================================================================================Error executing action `run` on resource 'execute[Force sync hardware clock with system clock]'================================================================================Mixlib::ShellOut::ShellCommandFailed------------------------------------Expected process to exit with [0], but received '70'---- Begin output of hwclock --systohc ----STDOUT:STDERR: hwclock: Cannot access the Hardware Clock via any known method.hwclock: Use the --debug option to see the details of our search for an access method.---- End output of hwclock --systohc ----Ran hwclock --systohc returned 70
I'm basically using the ntp cookbook tests to verify that I have my TK + docker setup correct, so that I can then move on to writing my own tests, so if this is just a specific issue with this cookbook, then I can move on. Just not sure if there are any other gotchas I need to look out for.:/tmp/kitchen# hwclock --systohc --debughwclock from util-linux 2.20.1hwclock: Open of /dev/rtc failed: No such file or directoryNo usable clock interface found.hwclock: Cannot access the Hardware Clock via any known method.:/tmp/kitchen#
Archive powered by MHonArc 2.6.16.