Bug 905842

Summary: NTP configuration fails if ntpd service is running in the machine already
Product: Red Hat OpenStack Reporter: Rami Vaknin <rvaknin>
Component: openstack-packstackAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: high Docs Contact:
Priority: high    
Version: 2.0 (Folsom)CC: aortega, derekh, oblaut, yeylon, ykaul
Target Milestone: snapshot4Keywords: Triaged
Target Release: 2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2012.2.2-0.9.dev406 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-21 18:26:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 912006    
Bug Blocks:    

Description Rami Vaknin 2013-01-30 09:57:10 UTC
Version:
Folsom on RHEL6.4, openstack-packstack-2012.2.2-0.8.dev346.el6ost

Scenario:
I've configured packstack to use my ntp server (using the CONFIG_NTP_SERVERS entry), and installation failed because ntpdate can not run while ntpd is running on the same machine.

# /usr/sbin/ntpdate qa1.qa.lab.tlv.redhat.com
30 Jan 09:31:46 ntpdate[6598]: the NTP socket is in use, exiting



From packstack's output:

# packstack --answer-file=ANSWER_FILE
Welcome to Installer setup utility

Installing:
Clean Up...                                              [ DONE ]
Setting Up ssh keys...root.160.29's password: 
root.160.25's password: 
root.160.27's password: 
                                   [ DONE ]
OS support check...                                      [ DONE ]
Running Pre install scripts...                           [ DONE ]
Installing time synchronization via NTP...               [ DONE ]
Create MySQL Manifest...                                 [ DONE ]
Creating QPID Manifest...                                [ DONE ]
Creating Keystone Manifest...                            [ DONE ]
Adding Glance Keystone Manifest entries...               [ DONE ]
Creating Galnce Manifest...                              [ DONE ]
Adding Cinder Keystone Manifest entries...               [ DONE ]
Checking if the Cinder server has a cinder-volumes vg... [ DONE ]
Creating Cinder Manifest...                              [ DONE ]
Adding Nova API Manifest entries...                      [ DONE ]
Adding Nova Keystone Manifest entries...                 [ DONE ]
Adding Nova Cert Manifest entries...                     [ DONE ]
Adding Nova Compute Manifest entries...                  [ DONE ]
Adding Nova Network Manifest entries...                  [ DONE ]
Adding Nova Scheduler Manifest entries...                [ DONE ]
Adding Nova VNC Proxy Manifest entries...                [ DONE ]
Adding Nova Common Manifest entries...                   [ DONE ]
Creating OS Client Manifest...                           [ DONE ]
Creating OS Horizon Manifest...                          [ DONE ]
Adding Swift Keystone Manifest entries...                [ DONE ]
Creating OS Swift builder Manifests...                   [ DONE ]
Creating OS Swift proxy Manifests...                     [ DONE ]
Creating OS Swift storage Manifests...                   [ DONE ]
Creating OS Swift Common Manifests...                    [ DONE ]
Preparing Servers...                                     [ DONE ]
Running Post install scripts...                          [ DONE ]
Installing Puppet...                                     [ DONE ]
Copying Puppet modules/manifests...                      [ DONE ]
Applying Puppet manifests...
Applying /var/tmp/packstack/20130130-0927/manifests/10.35.160.29_prescript.pp
Applying /var/tmp/packstack/20130130-0927/manifests/10.35.160.25_prescript.pp
Applying /var/tmp/packstack/20130130-0927/manifests/10.35.160.27_prescript.pp
Testing if puppet apply is finished : 10.35.160.29_prescript.pp
Testing if puppet apply is finished : 10.35.160.25_prescript.pp OK
Testing if puppet apply is finished : 10.35.160.29_prescript.pp OK
Testing if puppet apply is finished : 10.35.160.27_prescript.pp OK
Applying /var/tmp/packstack/20130130-0927/manifests/10.35.160.29_ntpd.pp
Applying /var/tmp/packstack/20130130-0927/manifests/10.35.160.25_ntpd.pp
Applying /var/tmp/packstack/20130130-0927/manifests/10.35.160.27_ntpd.pp
Testing if puppet apply is finished : 10.35.160.29_ntpd.pp
Testing if puppet apply is finished : 10.35.160.25_ntpd.pp
ERROR:root:Error  during remote puppet apply of /var/tmp/packstack/20130130-0927/manifests/10.35.160.27_ntpd.pp
ERROR:root:notice: /File[ntp_config]/content: content changed '{md5}32a4dd13b44b8c5ec7ca69872ac7f796' to '{md5}fb26e2660091a638b10a00e2f15ccc2c'
err: /Stage[main]//Exec[ntpdate]/returns: change from notrun to 0 failed: /usr/sbin/ntpdate qa1.qa.lab.tlv.redhat.com returned 1 instead of one of [0] at /var/tmp/packstack/20130130-0927/manifests/10.35.160.27_ntpd.pp:73
notice: /Stage[main]//Service[ntpd]: Dependency Exec[ntpdate] has failures: true
warning: /Stage[main]//Service[ntpd]: Skipping because of failed dependencies
notice: Finished catalog run in 2.03 seconds

Testing if puppet apply is finished : 10.35.160.27_ntpd.pp                          [ ERROR ]
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 qa1.qa.lab.tlv.redhat.com returned 1 instead of one of [0] at /var/tmp/packstack/20130130-0927/manifests/10.35.160.27_ntpd.pp:73

Error during puppet run : err: /Stage[main]//Exec[ntpdate]/returns: change from notrun to 0 failed: /usr/sbin/ntpdate qa1.qa.lab.tlv.redhat.com returned 1 instead of one of [0] at /var/tmp/packstack/20130130-0927/manifests/10.35.160.27_ntpd.pp:73
Please check log file /var/tmp/packstack/20130130-0927/openstack-setup.log for more information

Comment 2 Derek Higgins 2013-01-31 14:28:54 UTC
Patch submitted upstream
https://review.openstack.org/#/c/20900/1

Patch from Sandro Mathys, see
https://bugzilla.redhat.com/show_bug.cgi?id=906254

Comment 5 Nir Magnezi 2013-03-03 14:00:48 UTC
Verified NVR: openstack-packstack-2012.2.3-0.1.dev454.el6ost.noarch

1. Verified that my machine has a running ntpd service, with a proper NTP server configured in /etc/ntp.conf
2. Configured packstack answer file with a different NTP server than the one who's currently configured.
3. ran packstack.

Result:
1. OpenStack installed with no errors.
2. NTP service was reconfigured with the new NTP server.
3. ntpd service is up and running.

Comment 8 errata-xmlrpc 2013-03-21 18:26:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0671.html