Created attachment 1065480 [details] install logs Description of problem: 'openstack undercloud install' fails with following error . ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ESC[1;31mWarning: Variable access via 'notification_email_to' is deprecated. Use '@notification_email_to' instead. template[/etc/puppet/modules/keepalived/templates/global_config.erb]:3 (at /etc/puppet/modules/keepalived/templates/global_config.erb:3:in `block in result')ESC[0m ESC[1;31mWarning: notify is a metaparam; this value will inherit to all contained resources in the keepalived::instance definitionESC[0m ESC[1;31mError: Duplicate declaration: Mysql_database[172.16.23.2] is already declared in file /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57; cannot redeclare at /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57 on node rhospd7.sdiad.comESC[0m ESC[1;31mError: Duplicate declaration: Mysql_database[172.16.23.2] is already declared in file /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57; cannot redeclare at /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57 on node rhospd7.sdiad.comESC[0m + rc=1 + set -e + echo 'puppet apply exited with exit code 1' puppet apply exited with exit code 1 + '[' 1 '!=' 2 -a 1 '!=' 0 ']' + exit 1 [2015-08-20 15:45:46,536] (os-refresh-config) [ERROR] during configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/configure.d']' returned non-zero exit status 1] [2015-08-20 15:45:46,536] (os-refresh-config) [ERROR] Aborting... Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 526, in install _run_orc(instack_env) File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 461, in _run_orc _run_live_command(args, instack_env, 'os-refresh-config') File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 297, in _run_live_command raise RuntimeError('%s failed. See log for details.', name) RuntimeError: ('%s failed. See log for details.', 'os-refresh-config') ESC]0;stack@rhospd7:~^G[stack@rhospd7 ~]$ exit ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Version-Release number of selected component (if applicable): instack-0.0.7-1.el7ost.noarch Wed Aug 19 14:02:49 2015 instack-undercloud-2.1.2-23.el7ost.noarch Wed Aug 19 14:02:53 2015 openstack-tripleo-0.0.7-0.1.1664e566.el7ost.noarch Wed Aug 19 14:02:38 2015 openstack-tripleo-common-0.0.1.dev6-1.git49b57eb.el7ost.noarch Wed Aug 19 14:02:47 2015 openstack-tripleo-heat-templates-0.8.6-46.el7ost.noarch Wed Aug 19 14:02:32 2015 openstack-tripleo-image-elements-0.9.6-6.el7ost.noarch Wed Aug 19 14:02:51 2015 openstack-tripleo-puppet-elements-0.0.1-4.el7ost.noarch Wed Aug 19 14:02:33 2015 openstack-puppet-modules-2015.1.8-8.el7ost.noarch Thu Aug 20 14:15:16 2015 openstack-tripleo-puppet-elements-0.0.1-4.el7ost.noarch Wed Aug 19 14:02:33 2015 How reproducible: No Steps to Reproduce: 1. 2. 3. Actual results: 'openstack undercloud install' fails due to "Duplicate declaration: Mysql_database[172.16.23.2] is already declared in file /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57; cannot redeclare at /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57 on node rhospd7.sdiad.comESC[0m" Expected results: undercloud install succeeds . Additional info: PFA install log .
Mysql_database[172.16.23.2] should not happen, but it should be Mysql_database[keystone] or Mysql_database[database-name]. Definitely not an IP. It's maybe a parameter issue here? Can you share your configuration?
Emilien - Anything of interest from the undercloud config provided? If not what should our next steps be here? Thanks!
So looking at what's happening here: you're having this issue: Mysql_database[172.16.23.2] is already declared in file /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57; cannot redeclare at /etc/puppet/modules/openstacklib/manifests/db/mysql.pp:57 on node (...) It happens in Puppet when you have duplicated resources that is declared in the manifest. But here, the problem is also the resource name. It should not be an IP address but a database name (for example, 'keystone'). The code that manages Databases is here: https://github.com/rdo-management/instack-undercloud/blob/33683f86c5fe256db794e18b6dc5f9bc6cbaf61f/elements/puppet-stack-config/puppet-stack-config.pp#L31-L89 It looks like one of 'dbname' parameters is wrong, and set to an IP. 'dbname' is taken from "::db::database_connection" or "::database_connection" in the Hiera environment. So my only assumption here is an wrong parameter in our hieradata / yaml configuration for undercloud. Please provide it and we will continue to debug it.
the hieradata file we need to see is at /etc/puppet/hieradata/puppet-stack-config.yaml on the undercloud. can you please attach that here?
Jaison, we would be happy to help. Could you provide James's request? Thanks
I ran into this as well and found out what causes it. TL;DR;: don't use the characters @:/? in your passwords (e.g. from undercloud.conf). The puppet code splits the mysql connection string at the characters @:/? Then it makes assumptions about user, password, dbname and so on at certain indices of the resulting array. Now, if you used a password in the undercloud.conf which contains one of these split characters mentioned above, the assumptions of the puppet script fail and it all goes haywire. Someone should add a validation to tell the user he chose an invalid password.
comment 11 is a good sugestion, is there tripleo upstream LP bug to add such validation?