From 6eb4c1f33245fee66d59569a8df9fa906b019857 Mon Sep 17 00:00:00 2001 From: Daniel Mellado Date: Wed, 14 Feb 2018 13:26:25 +0100 Subject: [PATCH] Rename q- to neutron- services We were using neutron lib/neutron-legacy on our devstack plugin as we were enabling legacy services. This commit changes it so we rely on lib/neutron. Co-Authored-By: Carlos Goncalves Change-Id: I159dd4b371b870dc752fa01f738a2910263e3918 --- devstack/contrib/new-octavia-devstack.sh | 3 ++- devstack/plugin.sh | 12 ++++++------ devstack/samples/multinode/local-2.conf | 8 ++++---- devstack/samples/multinode/local.conf | 14 +++++++------- devstack/samples/singlenode/local.conf | 14 +++++++------- devstack/settings | 4 ++-- 6 files changed, 28 insertions(+), 27 deletions(-) diff --git a/devstack/contrib/new-octavia-devstack.sh b/devstack/contrib/new-octavia-devstack.sh index 8631c438bf..faa493d18f 100755 --- a/devstack/contrib/new-octavia-devstack.sh +++ b/devstack/contrib/new-octavia-devstack.sh @@ -40,7 +40,8 @@ ENABLED_SERVICES+=,placement-api,placement-client # Glance ENABLED_SERVICES+=,g-api,g-reg # Neutron -ENABLED_SERVICES+=,neutron,q-agt,q-dhcp,q-l3,q-meta,q-qos,q-svc +ENABLED_SERVICES+=,neutron-api,neutron-agent,neutron-dhcp,neutron-l3 +ENABLED_SERVICES+=,neutron-metadata-agent,neutron-qos # Tempest (optional) #ENABLED_SERVICES+=,tempest # Octavia diff --git a/devstack/plugin.sh b/devstack/plugin.sh index c7db1d6ad4..92f585fc73 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -326,9 +326,9 @@ function create_mgmt_network_interface { MGMT_PORT_IP=$(openstack port show -f value -c fixed_ips $MGMT_PORT_ID | awk '{FS=",| "; gsub(",",""); gsub("'\''",""); for(i = 1; i <= NF; ++i) {if ($i ~ /^ip_address/) {n=index($i, "="); if (substr($i, n+1) ~ "\\.") print substr($i, n+1)}}}') if function_exists octavia_create_network_interface_device ; then octavia_create_network_interface_device o-hm0 $MGMT_PORT_ID $MGMT_PORT_MAC - elif [[ $Q_AGENT == "openvswitch" ]]; then + elif [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" ]]; then sudo ovs-vsctl -- --may-exist add-port ${OVS_BRIDGE:-br-int} o-hm0 -- set Interface o-hm0 type=internal -- set Interface o-hm0 external-ids:iface-status=active -- set Interface o-hm0 external-ids:attached-mac=$MGMT_PORT_MAC -- set Interface o-hm0 external-ids:iface-id=$MGMT_PORT_ID -- set Interface o-hm0 external-ids:skip_cleanup=true - elif [[ $Q_AGENT == "linuxbridge" ]]; then + elif [[ $NEUTRON_AGENT == "linuxbridge" || $Q_AGENT == "linuxbridge" ]]; then if ! ip link show o-hm0 ; then sudo ip link add o-hm0 type veth peer name o-bhm0 NETID=$(openstack network show lb-mgmt-net -c id -f value) @@ -524,9 +524,9 @@ function octavia_stop { [ ! -z "$pids" ] && sudo kill $pids if function_exists octavia_delete_network_interface_device ; then octavia_delete_network_interface_device o-hm0 - elif [[ $Q_AGENT == "openvswitch" ]]; then + elif [[ $NEUTRON_AGENT == "openvswitch" || $Q_AGENT == "openvswitch" ]]; then : # Do nothing - elif [[ $Q_AGENT == "linuxbridge" ]]; then + elif [[ $NEUTRON_AGENT == "linuxbridge" || $Q_AGENT == "linuxbridge" ]]; then if ip link show o-hm0 ; then sudo ip link del o-hm0 fi @@ -576,8 +576,8 @@ function add_load-balancer_roles { # check for service enabled if is_service_enabled $OCTAVIA; then if [ $OCTAVIA_NODE == 'main' ] || [ $OCTAVIA_NODE == 'standalone' ] ; then # main-ha node stuff only - if ! is_service_enabled $Q_SVC; then - die "The neutron $Q_SVC service must be enabled to use $OCTAVIA" + if ! is_service_enabled $NEUTRON_ANY; then + die "The neutron-api/q-svc service must be enabled to use $OCTAVIA" fi if [ "$DISABLE_AMP_IMAGE_BUILD" == 'True' ]; then diff --git a/devstack/samples/multinode/local-2.conf b/devstack/samples/multinode/local-2.conf index 71c839f8db..fce9f538f7 100644 --- a/devstack/samples/multinode/local-2.conf +++ b/devstack/samples/multinode/local-2.conf @@ -26,8 +26,8 @@ enable_service n-cpu # Neutron enable_service neutron -enable_service q-agt -enable_service q-qos +enable_service neutron-agent +enable_service neutron-qos # LBaaS V2 and Octavia enable_service octavia @@ -50,7 +50,7 @@ OCTAVIA_NODE=second # to get the connection string constructed DATABASE_TYPE=mysql -Q_PLUGIN=ml2 +NEUTRON_CORE_PLUGIN=ml2 Q_ML2_TENANT_NETWORK_TYPE=vxlan LOGFILE=$DEST/logs/stack.sh.log @@ -62,7 +62,7 @@ LOGDAYS=2 HOST_IP=192.168.42.11 SERVICE_HOST=192.168.42.10 MULTI_HOST=1 -Q_HOST=$SERVICE_HOST +NEUTRON_SERVICE_HOST=$SERVICE_HOST MYSQL_HOST=$SERVICE_HOST RABBIT_HOST=$SERVICE_HOST GLANCE_HOSTPORT=$SERVICE_HOST:9292 diff --git a/devstack/samples/multinode/local.conf b/devstack/samples/multinode/local.conf index 62e4726807..693aa52af8 100644 --- a/devstack/samples/multinode/local.conf +++ b/devstack/samples/multinode/local.conf @@ -47,12 +47,12 @@ enable_service g-reg # Neutron enable_service neutron -enable_service q-svc -enable_service q-agt -enable_service q-dhcp -enable_service q-l3 -enable_service q-meta -enable_service q-qos +enable_service neutron-api +enable_service neutron-agent +enable_service neutron-dhcp +enable_service neutron-l3 +enable_service neutron-metadata-agent +enable_service neutron-qos # Octavia enable_service octavia @@ -68,7 +68,7 @@ OCTAVIA_CONTROLLER_IP_PORT_LIST=192.168.0.3:5555,192.168.0.4:5555 OCTAVIA_NODE=main OCTAVIA_NODES=main:192.168.42.10,second:192.168.42.11 -Q_PLUGIN=ml2 +NEUTRON_CORE_PLUGIN=ml2 Q_ML2_TENANT_NETWORK_TYPE=vxlan LOGFILE=$DEST/logs/stack.sh.log diff --git a/devstack/samples/singlenode/local.conf b/devstack/samples/singlenode/local.conf index c8f16be14b..7a9d985e1c 100644 --- a/devstack/samples/singlenode/local.conf +++ b/devstack/samples/singlenode/local.conf @@ -60,12 +60,12 @@ enable_service g-reg # Neutron enable_service neutron -enable_service q-svc -enable_service q-agt -enable_service q-dhcp -enable_service q-l3 -enable_service q-meta -enable_service q-qos +enable_service neutron-api +enable_service neutron-agent +enable_service neutron-dhcp +enable_service neutron-l3 +enable_service neutron-metadata-agent +enable_service neutron-qos # Octavia enable_service octavia @@ -77,7 +77,7 @@ enable_service o-api # enable DVR -Q_PLUGIN=ml2 +NEUTRON_CORE_PLUGIN=ml2 Q_ML2_TENANT_NETWORK_TYPE=vxlan Q_DVR_MODE=dvr_snat diff --git a/devstack/settings b/devstack/settings index 60a5a4787c..52a428f55a 100644 --- a/devstack/settings +++ b/devstack/settings @@ -79,8 +79,8 @@ GITDIR["python-octaviaclient"]=$DEST/python-octaviaclient NEUTRON_LBAAS_DIR=$DEST/neutron-lbaas NEUTRON_LBAAS_CONF=$NEUTRON_CONF_DIR/neutron_lbaas.conf OCTAVIA_SERVICE_PROVIDER=${OCTAVIA_SERVICE_PROVIDER:-"LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default"} -Q_SVC=${Q_SVC:-"q-svc"} -LBAAS_V2=${LBAAS_V2:-"q-lbaasv2"} +NEUTRON_ANY=${NEUTRON_ANY:-"q-svc neutron-api"} +LBAAS_V2=${LBAAS_V2:-"neutron-lbaasv2"} # HA-deployment related settings OCTAVIA_USE_PREGENERATED_SSH_KEY=${OCTAVIA_USE_PREGENERATED_SSH_KEY:-"False"}