Skip to content

Commit 21fee9d

Browse files
Jenkinsopenstack-gerrit
Jenkins
authored andcommitted
Merge "XenAPI:Fix problems to support xenserver+neutron"
2 parents 9cea6e8 + 201e3c1 commit 21fee9d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

lib/neutron-legacy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ function install_neutron {
638638
plugin_dir=$($ssh_dom0 "$xen_functions; set -eux; xapi_plugin_location")
639639

640640
# install neutron plugins to dom0
641-
tar -czf - -C $NEUTRON_DIR/neutron/plugins/openvswitch/agent/xenapi/etc/xapi.d/plugins/ ./ |
641+
tar -czf - -C $NEUTRON_DIR/neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/etc/xapi.d/plugins/ ./ |
642642
$ssh_dom0 "tar -xzf - -C $plugin_dir && chmod a+x $plugin_dir/*"
643643
fi
644644
}

lib/neutron_plugins/openvswitch_agent

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ function neutron_plugin_configure_plugin_agent {
7171
# Make a copy of our config for domU
7272
sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domU"
7373

74+
# change domU's config file to STACK_USER
75+
sudo chown $STACK_USER:$STACK_USER /$Q_PLUGIN_CONF_FILE.domU
76+
7477
# Deal with Dom0's L2 Agent:
7578
Q_RR_DOM0_COMMAND="$NEUTRON_BIN_DIR/neutron-rootwrap-xen-dom0 $Q_RR_CONF_FILE"
7679

@@ -82,7 +85,14 @@ function neutron_plugin_configure_plugin_agent {
8285
# Under XS/XCP, the ovs agent needs to target the dom0
8386
# integration bridge. This is enabled by using a root wrapper
8487
# that executes commands on dom0 via a XenAPI plugin.
88+
# XenAPI does not support daemon rootwrap now, so set root_helper_daemon empty
8589
iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_DOM0_COMMAND"
90+
iniset /$Q_PLUGIN_CONF_FILE agent root_helper_daemon ""
91+
92+
# Disable minimize polling, so that it can always detect OVS and Port changes
93+
# This is a problem of xenserver + neutron, bug has been reported
94+
# https://bugs.launchpad.net/neutron/+bug/1495423
95+
iniset /$Q_PLUGIN_CONF_FILE agent minimize_polling False
8696

8797
# Set "physical" mapping
8898
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE"
@@ -95,10 +105,14 @@ function neutron_plugin_configure_plugin_agent {
95105
# Create a bridge "br-$GUEST_INTERFACE_DEFAULT"
96106
_neutron_ovs_base_add_bridge "br-$GUEST_INTERFACE_DEFAULT"
97107
# Add $GUEST_INTERFACE_DEFAULT to that bridge
98-
sudo ovs-vsctl add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
108+
sudo ovs-vsctl -- --may-exist add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT
109+
110+
# Create external bridge and add port
111+
_neutron_ovs_base_add_bridge $PUBLIC_BRIDGE
112+
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE_DEFAULT
99113

100114
# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
101-
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:br-$GUEST_INTERFACE_DEFAULT"
115+
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:br-$GUEST_INTERFACE_DEFAULT,physnet-ex:$PUBLIC_BRIDGE"
102116
# Set integration bridge to domU's
103117
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $OVS_BRIDGE
104118
# Set root wrap

0 commit comments

Comments
 (0)