Bug 1143906

Summary: Errors when setting CONFIG_NEUTRON_OVS_TUNNEL_IF to a VLAN interface in RHEL OSP 4
Product: Red Hat OpenStack Reporter: Ramon Acedo <racedoro>
Component: openstack-packstackAssignee: Gaƫl Chamoulaud <gchamoul>
Status: CLOSED ERRATA QA Contact: Nir Magnezi <nmagnezi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.0CC: aberezin, aortega, derekh, gchamoul, jguiditt, mmagr, sclewis, yeylon
Target Milestone: z5Keywords: ZStream
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-packstack-2013.2.1-0.33.dev1048.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1146077 (view as bug list) Environment:
Last Closed: 2014-10-22 17:17:33 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: 1146077    

Description Ramon Acedo 2014-09-18 08:45:05 UTC
This bug seems to be present in openstack-packstack-2013.2.1-0.32.dev1018.el6ost:

https://bugzilla.redhat.com/show_bug.cgi?id=1057938

Please, verify and backport it so we can deploy RHEL OSP 4 with VLAN interfaces.

I manually applied this patch for GRE and it worked:

------------------------------------------------------------------------
commit 5b20d5ed1ea249c50178758bce02a6f614a30aeb
Author: Gael Chamoulaud <gchamoul>
Date:   Thu Jun 12 21:46:28 2014 +0200
 
    Handle interface names containing ".", "-" or ":"
   
    This fixes bz#1105166/bz#1057938 for packstack by calling regsubst() to replace
    ".", "-" or ":" with "_" in interface names when looking up ipaddress_* facts.
   
    Change-Id: I11cb747e5cdff35b69544598d6438ac35dc55ad0
    Fixes: rhbz#1105166, rhbz#1057938
 
diff --git a/packstack/puppet/templates/neutron_ovs_agent_gre.pp b/packstack/puppet/templates/neutron_ovs_agent_gre.pp
index 0f635b0..40c9f00 100644
--- a/packstack/puppet/templates/neutron_ovs_agent_gre.pp
+++ b/packstack/puppet/templates/neutron_ovs_agent_gre.pp
@@ -1,5 +1,6 @@
 if "%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s" {
-  $localip = $ipaddress_%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s
+  $iface = regsubst('%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s', '[\.\-\:]', '_', 'G')
+  $localip = inline_template("<%%= scope.lookupvar('::ipaddress_${iface}') %%>")
 } else {
   $localip = '%(CONFIG_NEUTRON_OVS_HOST)s'
 }

------------------------------------------------------------------------

The patch upstream also fixes it for VXLAN:

------------------------------------------------------------------------
diff --git a/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp b/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp
index 078a0ee..93bca41 100644
--- a/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp
+++ b/packstack/puppet/templates/neutron_ovs_agent_vxlan.pp
@@ -1,6 +1,7 @@
 
 if "%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s" {
-  $localip = $ipaddress_%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s
+  $iface = regsubst('%(CONFIG_NEUTRON_OVS_TUNNEL_IF)s', '[\.\-\:]', '_', 'G')
+  $localip = inline_template("<%%= scope.lookupvar('::ipaddress_${iface}') %%>")
 } else {
   $localip = '%(CONFIG_NEUTRON_OVS_HOST)s'
 }
------------------------------------------------------------------------

Comment 4 Nir Magnezi 2014-10-20 10:53:40 UTC
Already verified in: Bug #1146077 Comment #7


Verified NVR: openstack-packstack-2013.2.1-0.32.dev1040.el6ost.noarch

Tested with: Controller+Networker, 2 Computes
Neutron Config: ML2+OVS+VXLAN
OS: RHEL6.6

Verification Steps:
===================
1. Pre installation, I configured a tagged NIC on the networker and Compute nodes (eth3.183)

2. Configured IP address for each tagged NIC

3. Configured The answer file with a tagged interface as a tunnel interface:
    CONFIG_NEUTRON_OVS_TUNNEL_IF=eth3.183 
    See the answer file attached in comment #4

4. Deployed with packstack.

5. Created via neutron: Router, Network, Subnet, Router Interface.

6. Due to an error launching a nova instance (Unexpected vif_type=binding_failed) , I Modified neutron.conf and all nodes:
   a. report_interval = 5 
   b.agent_down_time = 75
   * Solution found at: https://www.redhat.com/archives/rdo-list/2014-May/msg00079.html

7. Launched an Instance.

8. from within the router namespace, pinged the instance.

Result:
=======
successfully ping the instance from within the router namespace, which means tunnels operate fine via tagged interfaces.

Comment 6 errata-xmlrpc 2014-10-22 17:17:33 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.

https://rhn.redhat.com/errata/RHSA-2014-1691.html