Bug 1258107

Summary: ml2 configuration changes are not pushed to ml2_conf.ini
Product: Red Hat OpenStack Reporter: bigswitch <rhosp-bugs-internal>
Component: rhosp-directorAssignee: Jiri Stransky <jstransk>
Status: CLOSED CURRENTRELEASE QA Contact: yeylon <yeylon>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0 (Kilo)CC: calfonso, jstransk, mandreou, mburns, rhel-osp-director-maint, rhosp-bugs-internal, srevivo
Target Milestone: ---   
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-08 16:05:57 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 bigswitch 2015-08-29 06:45:36 UTC
Description of problem:

We notice that though we specify the bigswitch-config.yaml file during the overcloud deployment, neutron plugin ml2 config settings is not modified accordingly.

Below is the command we used to deploy the overcloud, and the contents of bigswitch-config.yaml:
 
openstack overcloud deploy -e /home/stack/network-environment.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml -e /home/stack/templates/bigswitch-config.yaml --neutron-bridge-mappings datacentre:br-bond --neutron-network-type vlan --neutron-physical-bridge br-bond --neutron-network-vlan-ranges datacentre:50:90 --neutron-disable-tunneling --compute-scale 1 --control-scale 3 --ceph-storage-scale 0 --templates --control-flavor control --ntp-server 0.rhel.pool.ntp.org --debug 2>&1 | tee haha.log


cat bigswitch-config.yaml
# A Heat environment file which can be used to enable Big Switch
# extensions, configured via puppet
resource_registry:
  OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-bigswitch.yaml

parameter_defaults:
  # Required to fill in:
  NeutronBigswitchRestproxyServers: 10.8.68.11:8000,10.8.68.12:8000
  NeutronBigswitchRestproxyServerAuth: admin:adminadmin

  # Optional:
  NeutronBigswitchRestproxyAutoSyncOnFailure: True
  NeutronBigswitchRestproxyConsistencyInterval: 10
  NeutronBigswitchRestproxyNeutronId: neutron
  NeutronBigswitchRestproxyServerSsl: True
  NeutronBigswitchRestproxySslCertDirectory: /var/lib/neutron


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

We are using OSP7 with @Jiri's patch https://gist.github.com/jistr/2575b78058fed8be36d9

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Marios Andreou 2015-08-31 06:49:06 UTC
I think similar steps to what we looked at on Friday is a good start:

1. First make sure that any scripts you are using to patch the tripleo heat templates are working. Look at /usr/share/openstack-tripleo-heat-templates and make sure that they look ok (i.e. patched according to your needs)

2. If these are ok ^^^ but config isn't applying then check on the controller(s) for any errors during for example the puppet run (or application of any other config). Did the stack create OK? If not which resource failed. If it was a compute resource then also look on the compute note for any traceback/clues.

3. Could this be a product of the ml2 package install issue at https://bugzilla.redhat.com/show_bug.cgi?id=1258106 (don't know enough at this point about what is being installed by the package but could it be that if installed correctly we don't hit this?)

thanks

Comment 4 Jiri Stransky 2015-08-31 08:31:09 UTC
Writing of the config in OSPd context shouldn't depend on the Big Switch ML2 plugin package installation. But i second that 1. and 2. are things to look at.

Comment 5 bigswitch 2015-09-02 06:20:47 UTC
The [restproxy] section is actually get configured. However the "parameters" part in 
bigswitch-config.yaml did not get configured.

cat ../templates/bigswitch-config.yaml
# A Heat environment file which can be used to enable Big Switch
# extensions, configured via puppet
resource_registry:
  OS::TripleO::ControllerExtraConfigPre: ../puppet/extraconfig/pre_deploy/controller/neutron-bigswitch.yaml

parameters:
  ExtraConfig:
    neutron_ovs_use_veth: true                          <<< this is not applied
    NeutronMechanismDrivers: openvswitch, bsn_ml2       <<< nor this

parameter_defaults:
  # Required to fill in:
  NeutronBigswitchRestproxyServers: 10.8.68.11:8000,10.8.68.12:8000
  NeutronBigswitchRestproxyServerAuth: admin:adminadmin

  # Optional:
  NeutronBigswitchRestproxyAutoSyncOnFailure: True
  NeutronBigswitchRestproxyConsistencyInterval: 10
  NeutronBigswitchRestproxyNeutronId: neutron
  NeutronBigswitchRestproxyServerSsl: True
  NeutronBigswitchRestproxySslCertDirectory: /var/lib/neutron

Comment 6 Jiri Stransky 2015-09-02 08:22:12 UTC
The parameters section should look like this (moved NeutronMechanismDrivers a level up and removed the space after the comma):

parameters:
  ExtraConfig:
    neutron_ovs_use_veth: true
  NeutronMechanismDrivers: openvswitch,bsn_ml2

However at least the ovs_use_veth setting should have gotten applied. Let's debug together on the call.

Comment 7 chris alfonso 2015-09-02 16:21:35 UTC
Did it work after you corrected the params section?

Comment 8 bigswitch 2015-09-02 16:35:56 UTC
To summarize what we found so far:
1. [restproxy] portion of ml2_conf.ini, which specifies Big Switch controller information, is correctly configured.
2. ovs_use_veth = True is NOT configured in l3_agent.ini and dhcp_agent.ini. The reason is that the code is in upstream but not in osp product. @Jiri is going to do the backporting.
3. We haven't got the chance to try out @Jiri's proposal about NeutronMechanismDrivers. Will try it out today.

Comment 9 bigswitch 2015-09-03 01:39:29 UTC
With Jiri's suggestion, by fixing NeutronMechanismDrivers' indentation, bsn_ml2 is configured in ml2_conf.ini. However, ovs_use_veth is still false, even when I manually apply the patch at https://github.com/jistr/tripleo-bigswitch-temporary-setup/pull/2

Comment 10 Jiri Stransky 2015-09-03 08:46:02 UTC
Was the bigswitch config patch updated from patchset 2 to patchset 3 as suggested [1]?

[1] https://github.com/jistr/tripleo-bigswitch-temporary-setup/pull/2#issuecomment-137223131

Comment 11 bigswitch 2015-09-04 05:11:50 UTC
Here is the latest update about configuration problems.
1. ovs_use_veth is still false even though we applied patchset 3 at https://github.com/jistr/tripleo-bigswitch-temporary-setup/pull/2#issuecomment-137223131
2. In dhcp_agent.ini, both enable_isolated_metadata and enable_isolated_metadata are all false. This cause a vm cannot gets its metadata when its network is not attached to a router. We've discussed this before (https://bugzilla.redhat.com/show_bug.cgi?id=1254685). For the short term, we need to add Giulio's workaround in our script as well.
3. I notice that when l3_ha is true in neutron.conf, any change to floating ip causes l3 connectivity problem. The behavior is similar to https://bugzilla.redhat.com/show_bug.cgi?id=1181592, however, I didn't spend much time to figure out the root cause. On the other hand, if l3_ha is false, we don't have any problem with l3 connectivity and floating ip.

Comment 12 Jiri Stransky 2015-09-04 14:06:42 UTC
Re 1., i was able to reproduce this, it is caused by a known bug in CLI:

https://bugzilla.redhat.com/show_bug.cgi?id=1245737#c7

Since we only need this setting on controllers, i was able to fix the situation locally by using controllerExtraConfig instead. Please try amending the parameters section like this:

parameters:
  controllerExtraConfig:
    neutron_ovs_use_veth: true
  NeutronMechanismDrivers: openvswitch,bsn_ml2

On my environment the ovs_use_veth setting then got propagated:

[root@overcloud-controller-0 ~]# grep ^ovs_use_veth /etc/neutron/l3_agent.ini 
ovs_use_veth = True

Comment 13 Jiri Stransky 2015-09-04 15:21:02 UTC
Re 2., we can try:

parameters:
  controllerExtraConfig:
    neutron_ovs_use_veth: true
    neutron::agents::dhcp::enable_isolated_metadata: true
    neutron::agents::dhcp::enable_metadata_network: true
  NeutronMechanismDrivers: openvswitch,bsn_ml2

Comment 14 bigswitch 2015-09-04 16:51:31 UTC
Jiri, the proposed solution works. However there is one missing configure:
in dhcp_agent.ini, the ovs_use_veth is still false. Can we do something similar to make it true as well?

Comment 15 Jiri Stransky 2015-09-07 11:52:36 UTC
Yes, i updated https://review.openstack.org/213142 and tested it:

[root@overcloud-controller-0 ~]# grep ^ovs_use_veth /etc/neutron/dhcp_agent.ini 
ovs_use_veth = True

Comment 16 bigswitch 2015-09-08 16:04:58 UTC
Just verified, ovs_use_veth in dhcp_agent.ini got the correct configuration. We can close this bugzilla now.