Description of problem:
If one chooses to configure NTP servers, packstack will fail if ntpd is already running. The reason behind this is that both are sharing the same socket. Therefore ntpdate will print an error and return exit code 1, but packstack / puppet are expecting exit code 0.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Have ntpd already running (with default server configuration or whatever)
2. Tell packstack to configure NTP servers
3. See packstack fail
ERROR:root:Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 806, in main
File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 593, in _main
File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 569, in runSequences
File "/usr/lib/python2.6/site-packages/packstack/installer/setup_controller.py", line 57, in runAllSequences
File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 154, in run
File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 60, in run
File "/usr/lib/python2.6/site-packages/packstack/plugins/puppet_950.py", line 123, in applyPuppetManifest
File "/usr/lib/python2.6/site-packages/packstack/plugins/puppet_950.py", line 111, in waitforpuppet
File "/usr/lib/python2.6/site-packages/packstack/modules/ospluginutils.py", line 137, in validate_puppet_logfile
PackStackError: Error during puppet run : err: /Stage[main]//Exec[ntpdate]/returns: change from notrun to 0 failed: /usr/sbin/ntpdate 0.ch.pool.ntp.org returned 1 instead of one of  at /var/tmp/packstack/20130131-1048/manifests/10.112.1.28_ntpd.pp:76
Error during puppet run : err: /Stage[main]//Exec[ntpdate]/returns: change from notrun to 0 failed: /usr/sbin/ntpdate 0.ch.pool.ntp.org returned 1 instead of one of  at /var/tmp/packstack/20130131-1048/manifests/10.112.1.28_ntpd.pp:76
Configuration applied, no errors, ntpd running.
Might be best to exec "service ntpd stop ||:" before running ntpdate.
Created attachment 690845 [details]
Patch submitted upstream
Good point, patch is working, but it could be done easier  as puppet provides such function.
(In reply to comment #3)
> Good point, patch is working, but it could be done easier  as puppet
> provides such function.
>  http://www.puppetcookbook.com/posts/ensure-service-is-stopped.html
Sure, but ntpd is already defined (with the opposite value for "ensure") and puppet won't allow to define it a second time.
openstack-packstack-2012.2.2-0.8.dev406.el6 has been submitted as an update for Fedora EPEL 6.
openstack-packstack-2012.2.2-0.8.dev406.fc18 has been submitted as an update for Fedora 18.
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openstack-packstack-2012.2.2-0.8.dev406.fc18'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
openstack-packstack-2012.2.2-1.0.dev408.fc18 has been submitted as an update for Fedora 18.
openstack-packstack-2012.2.2-1.0.dev408.el6 has been submitted as an update for Fedora EPEL 6.
openstack-packstack-2012.2.3-0.1.dev454.fc18 has been submitted as an update for Fedora 18.
This is also a problem if the controller is also the NTP server. Puppet stops ntpd then runs ntpdate and it fails. A work around is to leave ntpd running and run ntpdate -bu <server>. This allows ntpdate to sync against a running ntpd on the same system. In small POC environments where a time server may not be reachable, this becomes a problem as a dedicated NTP server is needed.
Instead, the controller can be used to setup ntpd on it's own pseudo clock to at least keep all the OpenStack systems in sync, regardless if it can reach an external ntpd server.
Example configuration to accomplish this:
fudge 127.127.1.0 stratum 10
See Bug 1134613