With XenServer we have two neutron-openvswitch-agent(q-agt, q-domua)
For the q-domua it is specific for XenServer, this patch is to move
the specific configurations to os-xenapi which we have devstack plugin
in that repo
Depends-On: Ic816404c84f6a8899d01a77cb67fbfb421653e6b
Change-Id: I8a31c81d9475387fe4ed7030b70b26098e588771
| ... | ... |
@@ -432,24 +432,6 @@ function install_mutnauq {
|
| 432 | 432 |
|
| 433 | 433 |
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH |
| 434 | 434 |
setup_develop $NEUTRON_DIR |
| 435 |
- |
|
| 436 |
- if [ "$VIRT_DRIVER" == 'xenserver' ]; then |
|
| 437 |
- local dom0_ip |
|
| 438 |
- dom0_ip=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3-) |
|
| 439 |
- |
|
| 440 |
- local ssh_dom0 |
|
| 441 |
- ssh_dom0="sudo -u $DOMZERO_USER ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$dom0_ip" |
|
| 442 |
- |
|
| 443 |
- # Find where the plugins should go in dom0 |
|
| 444 |
- local xen_functions |
|
| 445 |
- xen_functions=$(cat $TOP_DIR/tools/xen/functions) |
|
| 446 |
- local plugin_dir |
|
| 447 |
- plugin_dir=$($ssh_dom0 "$xen_functions; set -eux; xapi_plugin_location") |
|
| 448 |
- |
|
| 449 |
- # install neutron plugins to dom0 |
|
| 450 |
- tar -czf - -C $NEUTRON_DIR/neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/etc/xapi.d/plugins/ ./ | |
|
| 451 |
- $ssh_dom0 "tar -xzf - -C $plugin_dir && chmod a+x $plugin_dir/*" |
|
| 452 |
- fi |
|
| 453 | 435 |
} |
| 454 | 436 |
|
| 455 | 437 |
# install_neutron_agent_packages() - Collect source and prepare |
| ... | ... |
@@ -523,11 +505,6 @@ function start_mutnauq_other_agents {
|
| 523 | 523 |
|
| 524 | 524 |
run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file $Q_META_CONF_FILE" |
| 525 | 525 |
run_process q-metering "$AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME" |
| 526 |
- |
|
| 527 |
- if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 528 |
- # For XenServer, start an agent for the domU openvswitch |
|
| 529 |
- run_process q-domua "$AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE.domU" |
|
| 530 |
- fi |
|
| 531 | 526 |
} |
| 532 | 527 |
|
| 533 | 528 |
# Start running processes, including screen |
| ... | ... |
@@ -539,10 +516,6 @@ function start_neutron_agents {
|
| 539 | 539 |
|
| 540 | 540 |
function stop_mutnauq_l2_agent {
|
| 541 | 541 |
stop_process q-agt |
| 542 |
- |
|
| 543 |
- if [ "$VIRT_DRIVER" = 'xenserver' ]; then |
|
| 544 |
- stop_process q-domua |
|
| 545 |
- fi |
|
| 546 | 542 |
} |
| 547 | 543 |
|
| 548 | 544 |
# stop_mutnauq_other() - Stop running processes (non-screen) |
| ... | ... |
@@ -11,12 +11,6 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base |
| 11 | 11 |
|
| 12 | 12 |
function neutron_plugin_create_nova_conf {
|
| 13 | 13 |
_neutron_ovs_base_configure_nova_vif_driver |
| 14 |
- if [ "$VIRT_DRIVER" == 'xenserver' ]; then |
|
| 15 |
- iniset $NOVA_CONF xenserver vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver |
|
| 16 |
- iniset $NOVA_CONF xenserver ovs_integration_bridge $XEN_INTEGRATION_BRIDGE |
|
| 17 |
- # Disable nova's firewall so that it does not conflict with neutron |
|
| 18 |
- iniset $NOVA_CONF DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver |
|
| 19 |
- fi |
|
| 20 | 14 |
} |
| 21 | 15 |
|
| 22 | 16 |
function neutron_plugin_install_agent_packages {
|
| ... | ... |
@@ -58,65 +52,6 @@ function neutron_plugin_configure_plugin_agent {
|
| 58 | 58 |
fi |
| 59 | 59 |
AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent" |
| 60 | 60 |
|
| 61 |
- if [ "$VIRT_DRIVER" == 'xenserver' ]; then |
|
| 62 |
- # Make a copy of our config for domU |
|
| 63 |
- sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domU" |
|
| 64 |
- |
|
| 65 |
- # change domU's config file to STACK_USER |
|
| 66 |
- sudo chown $STACK_USER:$STACK_USER /$Q_PLUGIN_CONF_FILE.domU |
|
| 67 |
- |
|
| 68 |
- # Deal with Dom0's L2 Agent: |
|
| 69 |
- Q_RR_DOM0_COMMAND="$NEUTRON_BIN_DIR/neutron-rootwrap-xen-dom0 $Q_RR_CONF_FILE" |
|
| 70 |
- |
|
| 71 |
- # For now, duplicate the xen configuration already found in nova.conf |
|
| 72 |
- iniset $Q_RR_CONF_FILE xenapi xenapi_connection_url "$XENAPI_CONNECTION_URL" |
|
| 73 |
- iniset $Q_RR_CONF_FILE xenapi xenapi_connection_username "$XENAPI_USER" |
|
| 74 |
- iniset $Q_RR_CONF_FILE xenapi xenapi_connection_password "$XENAPI_PASSWORD" |
|
| 75 |
- |
|
| 76 |
- # Under XS/XCP, the ovs agent needs to target the dom0 |
|
| 77 |
- # integration bridge. This is enabled by using a root wrapper |
|
| 78 |
- # that executes commands on dom0 via a XenAPI plugin. |
|
| 79 |
- # XenAPI does not support daemon rootwrap now, so set root_helper_daemon empty |
|
| 80 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper "" |
|
| 81 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper_daemon "xenapi_root_helper" |
|
| 82 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" xenapi connection_url "$XENAPI_CONNECTION_URL" |
|
| 83 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" xenapi connection_username "$XENAPI_USER" |
|
| 84 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" xenapi connection_password "$XENAPI_PASSWORD" |
|
| 85 |
- |
|
| 86 |
- # Disable minimize polling, so that it can always detect OVS and Port changes |
|
| 87 |
- # This is a problem of xenserver + neutron, bug has been reported |
|
| 88 |
- # https://bugs.launchpad.net/neutron/+bug/1495423 |
|
| 89 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" agent minimize_polling False |
|
| 90 |
- |
|
| 91 |
- # Set "physical" mapping |
|
| 92 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE" |
|
| 93 |
- |
|
| 94 |
- # XEN_INTEGRATION_BRIDGE is the integration bridge in dom0 |
|
| 95 |
- iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $XEN_INTEGRATION_BRIDGE |
|
| 96 |
- |
|
| 97 |
- # Set OVS native interface for ovs-agent in compute node |
|
| 98 |
- XEN_DOM0_IP=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3) |
|
| 99 |
- iniset /$Q_PLUGIN_CONF_FILE.domU ovs ovsdb_connection tcp:$XEN_DOM0_IP:6640 |
|
| 100 |
- iniset /$Q_PLUGIN_CONF_FILE.domU ovs of_listen_address $HOST_IP |
|
| 101 |
- |
|
| 102 |
- # Set up domU's L2 agent: |
|
| 103 |
- |
|
| 104 |
- # Create a bridge "br-$VLAN_INTERFACE" |
|
| 105 |
- _neutron_ovs_base_add_bridge "br-$VLAN_INTERFACE" |
|
| 106 |
- # Add $VLAN_INTERFACE to that bridge |
|
| 107 |
- sudo ovs-vsctl -- --may-exist add-port "br-$VLAN_INTERFACE" $VLAN_INTERFACE |
|
| 108 |
- |
|
| 109 |
- # Create external bridge and add port |
|
| 110 |
- _neutron_ovs_base_add_public_bridge |
|
| 111 |
- sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE |
|
| 112 |
- |
|
| 113 |
- # Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT" |
|
| 114 |
- iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings "physnet1:br-$VLAN_INTERFACE,physnet-ex:$PUBLIC_BRIDGE" |
|
| 115 |
- # Set integration bridge to domU's |
|
| 116 |
- iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $OVS_BRIDGE |
|
| 117 |
- # Set root wrap |
|
| 118 |
- iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND" |
|
| 119 |
- fi |
|
| 120 | 61 |
iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES |
| 121 | 62 |
iniset /$Q_PLUGIN_CONF_FILE ovs datapath_type $OVS_DATAPATH_TYPE |
| 122 | 63 |
} |
| ... | ... |
@@ -96,20 +96,6 @@ CRONTAB |
| 96 | 96 |
echo "create_directory_for_kernels" |
| 97 | 97 |
echo "install_conntrack_tools" |
| 98 | 98 |
} | $ssh_dom0 |
| 99 |
- |
|
| 100 |
- if is_service_enabled neutron; then |
|
| 101 |
- # Remove restriction on linux bridge in Dom0 when neutron is enabled |
|
| 102 |
- $ssh_dom0 "rm -f /etc/modprobe.d/blacklist-bridge*" |
|
| 103 |
- |
|
| 104 |
- count=`$ssh_dom0 "iptables -t filter -L XenServerDevstack |wc -l"` |
|
| 105 |
- if [ "$count" = "0" ]; then |
|
| 106 |
- {
|
|
| 107 |
- echo "iptables -t filter --new XenServerDevstack" |
|
| 108 |
- echo "iptables -t filter -I INPUT -j XenServerDevstack" |
|
| 109 |
- echo "iptables -t filter -I XenServerDevstack -p tcp --dport 6640 -j ACCEPT" |
|
| 110 |
- } | $ssh_dom0 |
|
| 111 |
- fi |
|
| 112 |
- fi |
|
| 113 | 99 |
} |
| 114 | 100 |
|
| 115 | 101 |
# install_nova_hypervisor() - Install external components |