Bug 1040021

Summary: openstack-foreman-installer: Failed to deploy neutron-controller/ neutron-compute. duplicate declaration: Neutron_config[database/connection]
Product: Red Hat OpenStack Reporter: Omri Hochman <ohochman>
Component: openstack-foreman-installerAssignee: Ryan O'Hara <rohara>
Status: CLOSED ERRATA QA Contact: Omri Hochman <ohochman>
Severity: high Docs Contact:
Priority: high    
Version: 4.0CC: breeler, hateya, morazi, rhos-maint, rohara, sclewis, yeylon
Target Milestone: rcKeywords: OtherQA
Target Release: 4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-foreman-installer-0.0.25-1.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-20 00:43:52 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:    
Bug Blocks: 1040649    
Attachments:
Description Flags
Fix controller.pp to work with updated pupet modules
none
Fix manifests to work with updated puppet modules none

Description Omri Hochman 2013-12-10 14:19:48 UTC
openstack-foreman-installer: Failed to deploy neutron-controller/ neutron-compute.  duplicate declaration: Neutron_config[database/connection]

Environment (havana puddle 2013-12-09.2):
----------------------------
openstack-foreman-installer-0.0.24-1.el6ost.noarch
puppet-3.2.4-3.el6_5.noarch
puppet-server-3.2.4-3.el6_5.noarch
packstack-modules-puppet-2013.2.1-0.14.dev919.el6ost.noarch


Steps:
------
1) Install foreman 
2) Add 2 hosts to neutron-controller/neutron-compute hostGroups
3) run puppet agent -t -v (on hosts)

Results:
--------
Failed to deploy neutron-controller/ neutron-compute.

puppet agent -t -v (trace) :
------------------------------
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ipa_client_configured.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/hamysql_active_node.rb
Info: Loading facts in /var/lib/puppet/lib/facter/network.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/netns_support.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Neutron_config[database/connection] is already declared in file /usr/share/openstack-foreman-installer/puppet/modules/quickstack/manifests/neutron/controller.pp:67; cannot redeclare at /usr/share/packstack/modules/neutron/manifests/server.pp:164 on node puma01.scl.lab.tlv.redhat.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Connection to 10.35.160.11 closed.
Warning: Permanently added '10.35.160.13' (RSA) to the list of known hosts.
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/netns_support.rb
Info: Loading facts in /var/lib/puppet/lib/facter/hamysql_active_node.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/network.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ipa_client_configured.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Nova_config[keystone_authtoken/auth_host] is already declared in file /usr/share/openstack-foreman-installer/puppet/modules/quickstack/manifests/compute_common.pp:26; cannot redeclare at /usr/share/packstack/modules/nova/manifests/api.pp:111 on node puma02.scl.lab.tlv.redhat.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Connection to 10.35.160.13 closed.

Comment 1 Ryan O'Hara 2013-12-10 14:24:25 UTC
I have a fix for this.

Comment 3 Ryan O'Hara 2013-12-10 14:37:17 UTC
Created attachment 834796 [details]
Fix controller.pp to work with updated pupet modules

This patch updates the neutron controller manifest to work with
updated pupet modules. Specifically, the nova auth setting should now
be done via nova::api class, not nova_config. Also, the neutron
database connection should be set via the neutron::server class, not
neutron_config.

Comment 4 Omri Hochman 2013-12-10 15:04:14 UTC
same problem with nova-network compute hostGroup: 

root@puma02 ~]# puppet agent -t -v
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/netns_support.rb
Info: Loading facts in /var/lib/puppet/lib/facter/hamysql_active_node.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/network.rb
Info: Loading facts in /var/lib/puppet/lib/facter/iptables_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ipa_client_configured.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ip6tables_version.rb
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Nova_config[keystone_authtoken/auth_host] is already declared in file /usr/share/openstack-foreman-installer/puppet/modules/quickstack/manifests/compute_common.pp:26; cannot redeclare at /usr/share/packstack/modules/nova/manifests/api.pp:111 on node puma02.scl.lab.tlv.redhat.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Comment 5 Ryan O'Hara 2013-12-10 21:22:51 UTC
Created attachment 834938 [details]
Fix manifests to work with updated puppet modules

This patch updates the nova/neutron controller and compute manifests to work with updated pupet modules. Specifically, the nova auth setting should now be done via nova::api class, not nova_config. Also, the neutron database connection should be set via the neutron::server class, not neutron_config.
    
In addition, the nova compute manifest does not and should not call the nova::api class. Instead, install the metadata-api service using nova::generic_service.

Comment 10 Ryan O'Hara 2013-12-18 17:47:29 UTC
Tested RHOS 4.0 RC on RHEL 6.5 with:

openstack-foreman-installer-1.0.0-1.el6ost.noarch
packstack-modules-puppet-2013.2.1-0.20.dev936.el6ost.noarch

Neutron controller host deployed without puppet errors. Marking as VERIFIED.

Comment 12 errata-xmlrpc 2013-12-20 00:43:52 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/RHEA-2013-1859.html