Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1109857

Summary: Failed to apply catalog: Parameter external_ids failed on Vs_bridge[br-ex]: Invalid external_ids bridge-id=br-ex. Must a list of key1=value2,key2=value2 at /usr/share/openstack-puppet/modules/neutron/manifests/plugins/ovs/bridge.pp:9
Product: Red Hat OpenStack Reporter: Miguel Angel Ajo <majopela>
Component: openstack-puppet-modulesAssignee: Ivan Chavero <ichavero>
Status: CLOSED ERRATA QA Contact: Ofer Blaut <oblaut>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.0 (RHEL 7)CC: apevec, gdubreui, ichavero, jguiditt, lpeer, majopela, mburns, morazi, oblaut, ohochman, rhos-maint, sasha, yeylon
Target Milestone: rc   
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-puppet-modules-2014.1-14.6.el7ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1109894 (view as bug list) Environment:
Last Closed: 2014-07-08 15:39:26 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: 1109894    
Attachments:
Description Flags
Fixes interface name check none

Description Miguel Angel Ajo 2014-06-16 13:47:51 UTC
Description of problem:

When trying to deploy with staypuft / foreman, deployment of network node fails with: 

Error: Failed to apply catalog: Parameter external_ids failed on Vs_bridge[br-ex]: Invalid external_ids bridge-id=br-ex. Must a list of key1=value2,key2=value2 at 


/etc/puppet/environments/production/modules/neutron/manifests/plugins/ovs/bridge.pp:9
Wrapped exception:
Invalid external_ids bridge-id=br-ex. Must a list of key1=value2,key2=value2



Version-Release number of selected component (if applicable):


openstack-puppet-modules-2014.1-14.3.el6ost.noarch
foreman-installer-staypuft-0.0.17-1.el6ost.noarch
foreman-installer-1.5.0-0.4.RC2.el6ost.noarch

foreman-proxy-1.6.0.6-1.el6sat.noarch
openstack-foreman-installer-2.0.6-1.el6ost.noarch
ruby193-rubygem-foreman_discovery-1.3.0-0.1.rc2.el6sat.noarch
foreman-discovery-image-6.5-20140424.0.1.el6sat.noarch
ruby193-rubygem-foreman_openstack_simplify-0.0.6-7.el6ost.noarch
foreman-1.6.0.15-1.el6sat.noarch
foreman-selinux-1.6.0-2.el6sat.noarch
ruby193-rubygem-foreman-tasks-0.5.7-2.el6sat.noarch
rubygem-foreman_api-0.1.11-4.el6sat.noarch

foreman-installer-staypuft-0.0.17-1.el6ost.noarch
ruby193-rubygem-staypuft-0.1.1-1.el6ost.noarch


How reproducible:

100%


Steps to Reproduce:
1. setup a deployment with staypuft or foreman alone
2.
   Set:
      Ovs bridge mappings to ["physnet1:br-ex"]
      Ovs bridge uplinks to ["br-ex:eth1"]
   for the network nodes

Actual results:

Error in puppet scripts.

Expected results:

Correct deployment.


Additional info:

Comment 1 Jason Guiditta 2014-06-16 13:56:24 UTC
This is a regression, this error has happened before.  I am pretty sure that last time it was related to the switch code, which I think was recently changed in an attempt to keep the ip for red hat systems.  This variable exists in vswitch/lib/puppet/provider/vs_bridge/ovs_redhat.rb.  I am not sure what the exact commit was, but I would check there in the recent opm build, we probably need to revert or fix that patch.  CC'ing Gilles, as he likely knows more about this area

Comment 2 Jason Guiditta 2014-06-16 13:59:00 UTC
looking at the file referenced in the error, it looks like perhaps all we need to change there is this line?
external_ids => "bridge-id=${bridge}"

Sounds like it needs to be:

external_ids => "[bridge-id=${bridge}]"

Comment 3 Miguel Angel Ajo 2014-06-16 14:04:19 UTC
Jason, let me check, I tried
external_ids => ["bridge-id=${bridge}"] but let me check external_ids => "[bridge-id=${bridge}]"

Comment 4 Miguel Angel Ajo 2014-06-16 14:19:19 UTC
Now it says:

Wrapped exception:
Invalid external_ids [bridge-id=br-ex]. Must a list of key1=value2,key2=value2

Comment 5 Jason Guiditta 2014-06-16 14:23:27 UTC
This is the BZ I believe this is related to: https://bugzilla.redhat.com/show_bug.cgi?id=1095279

Comment 6 Miguel Angel Ajo 2014-06-16 14:55:17 UTC
I tried something similar to this, I think the regex is broken:

Notice: /File[/var/lib/puppet/lib/puppet/type/vs_bridge.rb]/content: 
--- /var/lib/puppet/lib/puppet/type/vs_bridge.rb	2014-06-16 13:06:26.215319036 +0000
+++ /tmp/puppet-file20140616-19320-1ljmp3i	2014-06-16 14:51:15.802000000 +0000
@@ -22,7 +22,7 @@
       if !value.is_a?(String)
         raise ArgumentError, "Invalid external_ids #{value}. Requires a String, not a #{value.class}"
       end
-      if value !~ /^(?>[a-zA-Z]\w*=\w*){1}(?>[,][a-zA-Z]\w*=\w*)*$/
+      if value !~ /^(?>[a-zA-Z][\w\-\.]*=[\w\-\.]*){1}(?>[,][a-zA-Z][\w\-\.]*=[\w\-\.]*)*$/
         raise ArgumentError, "Invalid external_ids #{value}. Must a list of key1=value2,key2=value2"
       end
     end




Please note that eth1.1 should be accepted, etc...

Comment 7 Miguel Angel Ajo 2014-06-16 15:01:40 UTC
also @ and : should be accepted, as Ivan pointed out in IRC.

Comment 8 Alexander Chuzhoy 2014-06-16 15:28:42 UTC
Reproduced with staypuft:
foreman-installer-staypuft-0.0.17-1.el6ost.noarch
ruby193-rubygem-staypuft-0.1.2-1.el6ost.noarch
openstack-puppet-modules-2014.1-14.3.el6ost.noarch
openstack-foreman-installer-2.0.6-1.el6ost.noarch
ruby193-rubygem-foreman_openstack_simplify-0.0.6-7.el6ost.noarch

Comment 9 Ivan Chavero 2014-06-16 19:17:41 UTC
Created attachment 909213 [details]
Fixes interface name check

Comment 10 Alexander Chuzhoy 2014-06-16 22:11:27 UTC
Reproduced with newer version of staypuft:
foreman-installer-staypuft-0.0.18-1.el6ost.noarch
ruby193-rubygem-staypuft-0.1.3-1.el6ost.noarch
openstack-puppet-modules-2014.1-14.5.el6ost.noarch
openstack-foreman-installer-2.0.6-1.el6ost.noarch
ruby193-rubygem-foreman_openstack_simplify-0.0.6-7.el6ost.noarch

Comment 11 Alexander Chuzhoy 2014-06-16 22:19:25 UTC
Below are the relevant log entries for convenience:

Jun 16 21:51:37 525400868093 puppet-agent[2345]: Failed to apply catalog: Parameter external_ids failed on Vs_bridge[br-eth3]: Invalid external_ids bridge-id=br-eth3. Must a list of key1=value2,key2=value2 at /etc
/puppet/environments/production/modules/neutron/manifests/plugins/ovs/bridge.pp:9
Jun 16 21:51:37 525400868093 puppet-agent[2345]: Wrapped exception:
Jun 16 21:51:37 525400868093 puppet-agent[2345]: Invalid external_ids bridge-id=br-eth3. Must a list of key1=value2,key2=value2

Comment 12 Ivan Chavero 2014-06-16 22:58:36 UTC
Created a patch that fixes this, also added it for review to upstream

Comment 13 Gilles Dubreuil 2014-06-17 00:32:23 UTC
Ivan, thanks for addressing it (100377)

The above is waiting for depending 94312 to be merged (waiting for maintainer to act, seems he's on PTO)

Because it's broken anyway:
https://github.com/stackforge/puppet-vswitch/blob/master/lib/puppet/provider/vs_bridge/ovs.rb#L16

Comment 14 Ivan Chavero 2014-06-17 01:41:34 UTC
package with the fix created, Miguel, can you validate it?

Comment 15 Miguel Angel Ajo 2014-06-17 12:48:07 UTC
Testing https://brewweb.devel.redhat.com/buildinfo?buildID=363175

Comment 16 Miguel Angel Ajo 2014-06-18 14:04:05 UTC
Ok, your package fixed it. Great!

Comment 19 Omri Hochman 2014-06-25 18:37:21 UTC
Verified with openstack-puppet-modules-2014.1-16.2.el6ost.noarch.

Comment 20 Gilles Dubreuil 2014-07-03 12:14:13 UTC
Another very similar patch has made it's way upstream and has been merged
Upstream.

The exact same behavior is expected but ultimately we need to keep only the upstream version.

Comment 23 errata-xmlrpc 2014-07-08 15:39:26 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-2014-0846.html