Bug 1717114

Summary: When switching from NeutronTunnelTypes: 'vxlan' to NeutronTunnelTypes: '' in a cloud that was already deployed, puppet does not unset `agent/tunnel_types`, but it does unset `ovs_local_ip`
Product: Red Hat OpenStack Reporter: Andreas Karis <akaris>
Component: puppet-neutronAssignee: Brent Eagles <beagles>
Status: CLOSED ERRATA QA Contact: nlevinki <nlevinki>
Severity: high Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: amuller, beagles, ccamposr, chrisw, jjoyce, jschluet, pveiga, ralonsoh, scohen, skaplons, slinaber, tvignaud
Target Milestone: z9Keywords: Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: puppet-neutron-12.4.1-8.el7ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-07 14:01:17 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 Andreas Karis 2019-06-04 17:42:00 UTC
Description of problem:
This is a long standing issue and present in both OSP 10 and OSP 13: https://access.redhat.com/solutions/3445231

When switching from NeutronTunnelTypes: 'vxlan' to NeutronTunnelTypes: '' in a cloud that was already deployed, puppet does not unset `agent/tunnel_types`, but it does unset `ovs_local_ip`. This leads to the following ERROR:
~~~
ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [-] Tunneling can't be enabled with invalid local_ip 'None'. IP couldn't be found on this host's interfaces.
~~~

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

NeutronTunnelTypes: '' sets the following hieradata:
~~~
/etc/puppet/hieradata/service_configs.yaml:neutron::agents::ml2::ovs::tunnel_types: []
~~~

Which updates local_ip to the default of <None>:
~~~
/etc/neutron/plugins/ml2/openvswitch_agent.ini:#local_ip = <None>
~~~

However, Director keeps the definition for tunnel_types as "vxlan":
~~~
/etc/neutron/plugins/ml2/openvswitch_agent.ini:tunnel_types =vxlan
~~~

This looks like a bug, in /etc/puppet/modules/neutron/manifests/agents/ml2/ovs.pp:
~~~
  if $enable_tunneling_real {
    neutron_agent_ovs {
      'ovs/tunnel_bridge':         value => $tunnel_bridge;
      'ovs/local_ip':              value => $local_ip;
      'ovs/int_peer_patch_port':   value => $int_peer_patch_port;
      'ovs/tun_peer_patch_port':   value => $tun_peer_patch_port;
      'agent/tunnel_types':        value => join($tunnel_types, ',');
    }

    if 'vxlan' in $tunnel_types {
      validate_vxlan_udp_port($vxlan_udp_port)
      neutron_agent_ovs {
        'agent/vxlan_udp_port': value => $vxlan_udp_port;
      }
    }
  } else {
    neutron_agent_ovs {
      'ovs/tunnel_bridge':         ensure => absent;
      'ovs/local_ip':              ensure => absent;
      'ovs/int_peer_patch_port':   ensure => absent;
      'ovs/tun_peer_patch_port':   ensure => absent;
    }
  }
~~~

Looking at the  `else` section, agent/tunnel_types should be set to "ensure => absent". The same issue still exists in OSP 13.

Comment 1 Andreas Karis 2019-06-04 17:43:04 UTC
Affects OSP 10 as well.

Comment 15 Alex McLeod 2019-10-31 11:29:14 UTC
If this bug requires doc text for errata release, please set the 'Doc Type' and provide draft text according to the template in the 'Doc Text' field. The documentation team will review, edit, and approve the text.

If this bug does not require doc text, please set the 'requires_doc_text' flag to -.

Comment 17 errata-xmlrpc 2019-11-07 14:01:17 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://access.redhat.com/errata/RHBA-2019:3794