Browse code

XenAPI: correct the ml2 configuration for neutron

XenAPI requires two instances of L2Agent: the standard one manages OVS
bridges in DomU and the service name is called as q-agt in Devstack;
the other new L2Agent manages OVS bridges in Dom0 and the service name
is called as q-domuA. In order to support the new agent q-domuA, it
requires some XenAPI-specific configurations. But unfortunately those
XenAPI-specific configurations were configured in the standard agent
file, meaning other changes made to the standard agent file would not
have the correct effect. So it has caused issues, for example, floating
IP addresses are not reachable.
This fix is to move the XenAPI-specific configurations from the stardard
agent configuration file to the XenAPI-specific agent configuration file
so that it won't impact the standard agent's behavior.

Change-Id: I45944e84a1f81d016aa00da6d782801ee8457ea4

Jianghua Wang authored on 2016/11/11 19:23:17
Showing 1 changed files
... ...
@@ -81,19 +81,19 @@ function neutron_plugin_configure_plugin_agent {
81 81
         # integration bridge.  This is enabled by using a root wrapper
82 82
         # that executes commands on dom0 via a XenAPI plugin.
83 83
         # XenAPI does not support daemon rootwrap now, so set root_helper_daemon empty
84
-        iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_DOM0_COMMAND"
85
-        iniset /$Q_PLUGIN_CONF_FILE agent root_helper_daemon ""
84
+        iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper "$Q_RR_DOM0_COMMAND"
85
+        iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper_daemon ""
86 86
 
87 87
         # Disable minimize polling, so that it can always detect OVS and Port changes
88 88
         # This is a problem of xenserver + neutron, bug has been reported
89 89
         # https://bugs.launchpad.net/neutron/+bug/1495423
90
-        iniset /$Q_PLUGIN_CONF_FILE agent minimize_polling False
90
+        iniset "/$Q_PLUGIN_CONF_FILE.domU" agent minimize_polling False
91 91
 
92 92
         # Set "physical" mapping
93
-        iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE"
93
+        iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE"
94 94
 
95 95
         # XEN_INTEGRATION_BRIDGE is the integration bridge in dom0
96
-        iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $XEN_INTEGRATION_BRIDGE
96
+        iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $XEN_INTEGRATION_BRIDGE
97 97
 
98 98
         # Set up domU's L2 agent:
99 99
 
... ...
@@ -107,11 +107,11 @@ function neutron_plugin_configure_plugin_agent {
107 107
         sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE
108 108
 
109 109
         # Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
110
-        iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:br-$VLAN_INTERFACE,physnet-ex:$PUBLIC_BRIDGE"
110
+        iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings "physnet1:br-$VLAN_INTERFACE,physnet-ex:$PUBLIC_BRIDGE"
111 111
         # Set integration bridge to domU's
112
-        iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $OVS_BRIDGE
112
+        iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $OVS_BRIDGE
113 113
         # Set root wrap
114
-        iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper "$Q_RR_COMMAND"
114
+        iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND"
115 115
     fi
116 116
     iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES
117 117
     iniset /$Q_PLUGIN_CONF_FILE ovs datapath_type $OVS_DATAPATH_TYPE