Bug 905737

Summary: When using packstack where hostname is localhost.localdomain, mysql fails to install
Product: Red Hat OpenStack Reporter: Perry Myers <pmyers>
Component: openstack-packstackAssignee: Martin Magr <mmagr>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.0 (Folsom)CC: aortega, derekh, fpercoco, gkotton, ykaul
Target Milestone: snapshot3Keywords: 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-05 21:03:05 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:

Description Perry Myers 2013-01-30 03:49:07 UTC
Description of problem:
When using packstack where hostname is localhost.localdomain, mysql fails to install

See below log snippet.

If I set the hostname to foo, it runs perfectly fine.

Version-Release number of selected component (if applicable):
openstack-packstack-2012.2.2-0.8.dev346.el6ost.noarch

How reproducible:
Only if hostname is localhost.localdomain

Steps to Reproduce:
1. Start with pristine RHEL 6.4 host w/ mysql-server already installed
2. yum install openstack-packstack
3. packstack with default values for everything (all in one install)
  
Actual results:
mysql puppet script fails

Expected results:
success!

Additional info:

Packstack Log:
2013-01-29 22:41:55::ERROR::ospluginutils::135::root:: Error  during remote puppet apply of /var/tmp/packstack/20130129-2240/manifests/192.168.1.180_mysql.pp
2013-01-29 22:41:55::ERROR::ospluginutils::136::root:: Duplicate definition: Database_user[@localhost] is already defined in file /var/tmp/packstack/20130129-2240/manifests/192.168.1.180_mysql.pp at line 13; cannot redefine at /var/tmp/packstack/20130129-2240/manifests/192.168.1.180_mysql.pp:22 on node localhost.localdomain

2013-01-29 22:41:55::ERROR::run_setup::814::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 : Duplicate definition: Database_user[@localhost] is already defined in file /var/tmp/packstack/20130129-2240/manifests/192.168.1.180_mysql.pp at line 13; cannot redefine at /var/tmp/packstack/20130129-2240/manifests/192.168.1.180_mysql.pp:22 on node localhost.localdomain

Comment 1 Derek Higgins 2013-01-31 00:28:56 UTC
fix submitted upstream
https://review.openstack.org/#/c/20851/1

tested on a host with the following hostname details (which was reproducing the problem before the change)

$ facter | grep -e fqdn -e hostname
fqdn => localhost.novalocal
hostname => localhost
$ hostname
localhost.novalocal
$

Comment 2 Perry Myers 2013-02-04 09:52:27 UTC
*** Bug 907367 has been marked as a duplicate of this bug. ***

Comment 3 Martin Magr 2013-02-14 11:40:25 UTC
openstack-packstack-2012.2.2-0.9.dev406

Comment 5 Nir Magnezi 2013-02-25 07:59:21 UTC
Verified NVR: openstack-packstack-2012.2.2-1.0.dev408.el6ost.noarch

1. Checked that the hostname is  

$ facter | grep -e fqdn -e hostname
fqdn => localhost.localdomain
hostname => localhost

2. Repeated Steps to Reproduce from Comment #0

Result: OpenStack installed with no errors

Comment 7 errata-xmlrpc 2013-03-05 21:03:05 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-0595.html