Merge "Remove XenServer specific ovs agent config"
This commit is contained in:
commit
4df8d6d425
@ -432,24 +432,6 @@ function install_mutnauq {
|
||||
|
||||
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
|
||||
setup_develop $NEUTRON_DIR
|
||||
|
||||
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||
local dom0_ip
|
||||
dom0_ip=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3-)
|
||||
|
||||
local ssh_dom0
|
||||
ssh_dom0="sudo -u $DOMZERO_USER ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$dom0_ip"
|
||||
|
||||
# Find where the plugins should go in dom0
|
||||
local xen_functions
|
||||
xen_functions=$(cat $TOP_DIR/tools/xen/functions)
|
||||
local plugin_dir
|
||||
plugin_dir=$($ssh_dom0 "$xen_functions; set -eux; xapi_plugin_location")
|
||||
|
||||
# install neutron plugins to dom0
|
||||
tar -czf - -C $NEUTRON_DIR/neutron/plugins/ml2/drivers/openvswitch/agent/xenapi/etc/xapi.d/plugins/ ./ |
|
||||
$ssh_dom0 "tar -xzf - -C $plugin_dir && chmod a+x $plugin_dir/*"
|
||||
fi
|
||||
}
|
||||
|
||||
# install_neutron_agent_packages() - Collect source and prepare
|
||||
@ -523,11 +505,6 @@ function start_mutnauq_other_agents {
|
||||
|
||||
run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file $Q_META_CONF_FILE"
|
||||
run_process q-metering "$AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
|
||||
|
||||
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
||||
# For XenServer, start an agent for the domU openvswitch
|
||||
run_process q-domua "$AGENT_BINARY --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE.domU"
|
||||
fi
|
||||
}
|
||||
|
||||
# Start running processes, including screen
|
||||
@ -539,10 +516,6 @@ function start_neutron_agents {
|
||||
|
||||
function stop_mutnauq_l2_agent {
|
||||
stop_process q-agt
|
||||
|
||||
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
|
||||
stop_process q-domua
|
||||
fi
|
||||
}
|
||||
|
||||
# stop_mutnauq_other() - Stop running processes (non-screen)
|
||||
|
@ -11,12 +11,6 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base
|
||||
|
||||
function neutron_plugin_create_nova_conf {
|
||||
_neutron_ovs_base_configure_nova_vif_driver
|
||||
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||
iniset $NOVA_CONF xenserver vif_driver nova.virt.xenapi.vif.XenAPIOpenVswitchDriver
|
||||
iniset $NOVA_CONF xenserver ovs_integration_bridge $XEN_INTEGRATION_BRIDGE
|
||||
# Disable nova's firewall so that it does not conflict with neutron
|
||||
iniset $NOVA_CONF DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
|
||||
fi
|
||||
}
|
||||
|
||||
function neutron_plugin_install_agent_packages {
|
||||
@ -58,65 +52,6 @@ function neutron_plugin_configure_plugin_agent {
|
||||
fi
|
||||
AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-openvswitch-agent"
|
||||
|
||||
if [ "$VIRT_DRIVER" == 'xenserver' ]; then
|
||||
# Make a copy of our config for domU
|
||||
sudo cp /$Q_PLUGIN_CONF_FILE "/$Q_PLUGIN_CONF_FILE.domU"
|
||||
|
||||
# change domU's config file to STACK_USER
|
||||
sudo chown $STACK_USER:$STACK_USER /$Q_PLUGIN_CONF_FILE.domU
|
||||
|
||||
# Deal with Dom0's L2 Agent:
|
||||
Q_RR_DOM0_COMMAND="$NEUTRON_BIN_DIR/neutron-rootwrap-xen-dom0 $Q_RR_CONF_FILE"
|
||||
|
||||
# For now, duplicate the xen configuration already found in nova.conf
|
||||
iniset $Q_RR_CONF_FILE xenapi xenapi_connection_url "$XENAPI_CONNECTION_URL"
|
||||
iniset $Q_RR_CONF_FILE xenapi xenapi_connection_username "$XENAPI_USER"
|
||||
iniset $Q_RR_CONF_FILE xenapi xenapi_connection_password "$XENAPI_PASSWORD"
|
||||
|
||||
# Under XS/XCP, the ovs agent needs to target the dom0
|
||||
# integration bridge. This is enabled by using a root wrapper
|
||||
# that executes commands on dom0 via a XenAPI plugin.
|
||||
# XenAPI does not support daemon rootwrap now, so set root_helper_daemon empty
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper ""
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" agent root_helper_daemon "xenapi_root_helper"
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" xenapi connection_url "$XENAPI_CONNECTION_URL"
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" xenapi connection_username "$XENAPI_USER"
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" xenapi connection_password "$XENAPI_PASSWORD"
|
||||
|
||||
# Disable minimize polling, so that it can always detect OVS and Port changes
|
||||
# This is a problem of xenserver + neutron, bug has been reported
|
||||
# https://bugs.launchpad.net/neutron/+bug/1495423
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" agent minimize_polling False
|
||||
|
||||
# Set "physical" mapping
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs bridge_mappings "physnet1:$FLAT_NETWORK_BRIDGE"
|
||||
|
||||
# XEN_INTEGRATION_BRIDGE is the integration bridge in dom0
|
||||
iniset "/$Q_PLUGIN_CONF_FILE.domU" ovs integration_bridge $XEN_INTEGRATION_BRIDGE
|
||||
|
||||
# Set OVS native interface for ovs-agent in compute node
|
||||
XEN_DOM0_IP=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3)
|
||||
iniset /$Q_PLUGIN_CONF_FILE.domU ovs ovsdb_connection tcp:$XEN_DOM0_IP:6640
|
||||
iniset /$Q_PLUGIN_CONF_FILE.domU ovs of_listen_address $HOST_IP
|
||||
|
||||
# Set up domU's L2 agent:
|
||||
|
||||
# Create a bridge "br-$VLAN_INTERFACE"
|
||||
_neutron_ovs_base_add_bridge "br-$VLAN_INTERFACE"
|
||||
# Add $VLAN_INTERFACE to that bridge
|
||||
sudo ovs-vsctl -- --may-exist add-port "br-$VLAN_INTERFACE" $VLAN_INTERFACE
|
||||
|
||||
# Create external bridge and add port
|
||||
_neutron_ovs_base_add_public_bridge
|
||||
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE
|
||||
|
||||
# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT"
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs bridge_mappings "physnet1:br-$VLAN_INTERFACE,physnet-ex:$PUBLIC_BRIDGE"
|
||||
# Set integration bridge to domU's
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs integration_bridge $OVS_BRIDGE
|
||||
# Set root wrap
|
||||
iniset /$Q_PLUGIN_CONF_FILE agent root_helper "$Q_RR_COMMAND"
|
||||
fi
|
||||
iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES
|
||||
iniset /$Q_PLUGIN_CONF_FILE ovs datapath_type $OVS_DATAPATH_TYPE
|
||||
}
|
||||
|
@ -96,20 +96,6 @@ CRONTAB
|
||||
echo "create_directory_for_kernels"
|
||||
echo "install_conntrack_tools"
|
||||
} | $ssh_dom0
|
||||
|
||||
if is_service_enabled neutron; then
|
||||
# Remove restriction on linux bridge in Dom0 when neutron is enabled
|
||||
$ssh_dom0 "rm -f /etc/modprobe.d/blacklist-bridge*"
|
||||
|
||||
count=`$ssh_dom0 "iptables -t filter -L XenServerDevstack |wc -l"`
|
||||
if [ "$count" = "0" ]; then
|
||||
{
|
||||
echo "iptables -t filter --new XenServerDevstack"
|
||||
echo "iptables -t filter -I INPUT -j XenServerDevstack"
|
||||
echo "iptables -t filter -I XenServerDevstack -p tcp --dport 6640 -j ACCEPT"
|
||||
} | $ssh_dom0
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# install_nova_hypervisor() - Install external components
|
||||
|
Loading…
Reference in New Issue
Block a user