Merge "XenAPI: move Neutron plugin install to domU"
This commit is contained in:
commit
ca6156bc03
18
lib/neutron
18
lib/neutron
@ -597,6 +597,24 @@ function init_neutron {
|
|||||||
function install_neutron {
|
function install_neutron {
|
||||||
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
|
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
|
||||||
setup_develop $NEUTRON_DIR
|
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/openvswitch/agent/xenapi/etc/xapi.d/plugins/ ./ |
|
||||||
|
$ssh_dom0 "tar -xzf - -C $plugin_dir && chmod a+x $plugin_dir/*"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# install_neutronclient() - Collect source and prepare
|
# install_neutronclient() - Collect source and prepare
|
||||||
|
@ -65,16 +65,6 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install plugins
|
|
||||||
|
|
||||||
## Install the netwrap xapi plugin to support agent control of dom0 networking
|
|
||||||
if [[ "$ENABLED_SERVICES" =~ "q-agt" && "$Q_PLUGIN" = "openvswitch" ]]; then
|
|
||||||
NEUTRON_ZIPBALL_URL=${NEUTRON_ZIPBALL_URL:-$(zip_snapshot_location $NEUTRON_REPO $NEUTRON_BRANCH)}
|
|
||||||
EXTRACTED_NEUTRON=$(extract_remote_zipball "$NEUTRON_ZIPBALL_URL")
|
|
||||||
install_xapi_plugins_from "$EXTRACTED_NEUTRON"
|
|
||||||
rm -rf "$EXTRACTED_NEUTRON"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Configure Networking
|
# Configure Networking
|
||||||
#
|
#
|
||||||
@ -88,9 +78,7 @@ setup_network "$PUB_BRIDGE_OR_NET_NAME"
|
|||||||
|
|
||||||
# With neutron, one more network is required, which is internal to the
|
# With neutron, one more network is required, which is internal to the
|
||||||
# hypervisor, and used by the VMs
|
# hypervisor, and used by the VMs
|
||||||
if is_service_enabled neutron; then
|
setup_network "$XEN_INT_BRIDGE_OR_NET_NAME"
|
||||||
setup_network "$XEN_INT_BRIDGE_OR_NET_NAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if parameter_is_specified "FLAT_NETWORK_BRIDGE"; then
|
if parameter_is_specified "FLAT_NETWORK_BRIDGE"; then
|
||||||
if [ "$(bridge_for "$VM_BRIDGE_OR_NET_NAME")" != "$(bridge_for "$FLAT_NETWORK_BRIDGE")" ]; then
|
if [ "$(bridge_for "$VM_BRIDGE_OR_NET_NAME")" != "$(bridge_for "$FLAT_NETWORK_BRIDGE")" ]; then
|
||||||
@ -292,14 +280,12 @@ $THIS_DIR/build_xva.sh "$GUEST_NAME"
|
|||||||
# Attach a network interface for the integration network (so that the bridge
|
# Attach a network interface for the integration network (so that the bridge
|
||||||
# is created by XenServer). This is required for Neutron. Also pass that as a
|
# is created by XenServer). This is required for Neutron. Also pass that as a
|
||||||
# kernel parameter for DomU
|
# kernel parameter for DomU
|
||||||
if is_service_enabled neutron; then
|
attach_network "$XEN_INT_BRIDGE_OR_NET_NAME"
|
||||||
attach_network "$XEN_INT_BRIDGE_OR_NET_NAME"
|
|
||||||
|
|
||||||
XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME")
|
XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME")
|
||||||
append_kernel_cmdline \
|
append_kernel_cmdline \
|
||||||
"$GUEST_NAME" \
|
"$GUEST_NAME" \
|
||||||
"xen_integration_bridge=${XEN_INTEGRATION_BRIDGE}"
|
"xen_integration_bridge=${XEN_INTEGRATION_BRIDGE}"
|
||||||
fi
|
|
||||||
|
|
||||||
FLAT_NETWORK_BRIDGE="${FLAT_NETWORK_BRIDGE:-$(bridge_for "$VM_BRIDGE_OR_NET_NAME")}"
|
FLAT_NETWORK_BRIDGE="${FLAT_NETWORK_BRIDGE:-$(bridge_for "$VM_BRIDGE_OR_NET_NAME")}"
|
||||||
append_kernel_cmdline "$GUEST_NAME" "flat_network_bridge=${FLAT_NETWORK_BRIDGE}"
|
append_kernel_cmdline "$GUEST_NAME" "flat_network_bridge=${FLAT_NETWORK_BRIDGE}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user