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): openstack-packstack-2012.2.2-0.7.dev346.el6.noarch How reproducible: Always 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 Actual results: ERROR:root:Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 806, in main _main(confFile) File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 593, in _main runSequences() File "/usr/lib/python2.6/site-packages/packstack/installer/run_setup.py", line 569, in runSequences controller.runAllSequences() File "/usr/lib/python2.6/site-packages/packstack/installer/setup_controller.py", line 57, in runAllSequences sequence.run() File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 154, in run step.run() File "/usr/lib/python2.6/site-packages/packstack/installer/setup_sequences.py", line 60, in run function() File "/usr/lib/python2.6/site-packages/packstack/plugins/puppet_950.py", line 123, in applyPuppetManifest waitforpuppet(currently_running) File "/usr/lib/python2.6/site-packages/packstack/plugins/puppet_950.py", line 111, in waitforpuppet validate_puppet_logfile(log) File "/usr/lib/python2.6/site-packages/packstack/modules/ospluginutils.py", line 137, in validate_puppet_logfile raise PackStackError(message) 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 [0] 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 [0] at /var/tmp/packstack/20130131-1048/manifests/10.112.1.28_ntpd.pp:76 Expected results: Configuration applied, no errors, ntpd running. Additional info: Might be best to exec "service ntpd stop ||:" before running ntpdate.
Created attachment 690845 [details] proposed patch
Patch submitted upstream https://review.openstack.org/#/c/20900/1
Good point, patch is working, but it could be done easier [1] as puppet provides such function. [1] http://www.puppetcookbook.com/posts/ensure-service-is-stopped.html
(In reply to comment #3) > Good point, patch is working, but it could be done easier [1] as puppet > provides such function. > > [1] 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. https://admin.fedoraproject.org/updates/openstack-packstack-2012.2.2-0.8.dev406.el6
openstack-packstack-2012.2.2-0.8.dev406.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/openstack-packstack-2012.2.2-0.8.dev406.fc18
Package openstack-packstack-2012.2.2-0.8.dev406.fc18: * 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: https://admin.fedoraproject.org/updates/FEDORA-2013-2483/openstack-packstack-2012.2.2-0.8.dev406.fc18 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. https://admin.fedoraproject.org/updates/openstack-packstack-2012.2.2-1.0.dev408.fc18
openstack-packstack-2012.2.2-1.0.dev408.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/openstack-packstack-2012.2.2-1.0.dev408.el6
openstack-packstack-2012.2.3-0.1.dev454.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/openstack-packstack-2012.2.3-0.1.dev454.fc18
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: server 127.127.1.0 fudge 127.127.1.0 stratum 10 See Bug 1134613