Rename devstack service neutron-ovn-metadata-agent

... to q-ovn-metadata-agent.

To the best of my understanding we decided to keep using the
neutron-legacy devstack module since it is the one used in the gate:

http://lists.openstack.org/pipermail/openstack-discuss/2019-December/thread.html#11544

And we merge new features like the ovn migration only working with
neutron-legacy:

https://review.opendev.org/696592

It seems to me we were a bit inconsistent in naming devstack service
'neutron-ovn-metadata-agent' since legacy style devstack service
names start with 'q-'.

For example this sample config is broken:

https://opendev.org/openstack/neutron/src/branch/master/devstack/ovn-compute-local.conf.sample#L31-L35

stack.sh dies with:

lib/neutron: line 368: neutron_plugin_create_nova_conf: command not found

Because not having a single 'q-' service in that enabled service list
we trip up devstack's 'is_neutron_legacy_enabled' check:

e51cbf0ea9/lib/neutron (L127-L135)

This change renames devstack service neutron-ovn-metadata-agent
to q-ovn-metadata-agent.

I'm not proud to propose this change in 2020 (circa 5 years after
the rename from Quantum to Neutron) so let me know if you see a better
way. :-)

Change-Id: I507a3426e2b63bff49891bd5a51fa9d9999a0ffa
This commit is contained in:
Bence Romsics 2020-02-14 15:52:05 +01:00
parent fb2453c999
commit 02a7e96743
6 changed files with 14 additions and 14 deletions

View File

@ -500,7 +500,7 @@ function configure_ovn_plugin {
populate_ml2_config /$Q_PLUGIN_CONF_FILE securitygroup enable_security_group="$Q_USE_SECGROUP" populate_ml2_config /$Q_PLUGIN_CONF_FILE securitygroup enable_security_group="$Q_USE_SECGROUP"
inicomment /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver inicomment /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver
if is_service_enabled neutron-ovn-metadata-agent; then if is_service_enabled q-ovn-metadata-agent; then
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=True populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=True
else else
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=False populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=False
@ -519,7 +519,7 @@ function configure_ovn_plugin {
fi fi
if is_service_enabled n-api-meta ; then if is_service_enabled n-api-meta ; then
if is_service_enabled neutron-ovn-metadata-agent ; then if is_service_enabled q-ovn-metadata-agent ; then
iniset $NOVA_CONF neutron service_metadata_proxy True iniset $NOVA_CONF neutron service_metadata_proxy True
fi fi
fi fi
@ -538,7 +538,7 @@ function configure_ovn {
fi fi
# Metadata # Metadata
if is_service_enabled neutron-ovn-metadata-agent && is_service_enabled ovn-controller; then if is_service_enabled q-ovn-metadata-agent && is_service_enabled ovn-controller; then
sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR
mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2 mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2
@ -655,8 +655,8 @@ function _start_ovn_services {
if is_service_enabled ovn-controller-vtep ; then if is_service_enabled ovn-controller-vtep ; then
_start_process "devstack@ovn-controller-vtep.service" _start_process "devstack@ovn-controller-vtep.service"
fi fi
if is_service_enabled neutron-ovn-metadata-agent; then if is_service_enabled q-ovn-metadata-agent; then
_start_process "devstack@neutron-ovn-metadata-agent.service" _start_process "devstack@q-ovn-metadata-agent.service"
fi fi
} }
@ -695,8 +695,8 @@ function start_ovn {
_run_process ovn-controller-vtep "$cmd" "" "$STACK_GROUP" "root" _run_process ovn-controller-vtep "$cmd" "" "$STACK_GROUP" "root"
fi fi
if is_service_enabled neutron-ovn-metadata-agent; then if is_service_enabled q-ovn-metadata-agent; then
run_process neutron-ovn-metadata-agent "$NEUTRON_OVN_BIN_DIR/$NEUTRON_OVN_METADATA_BINARY --config-file $OVN_META_CONF" run_process q-ovn-metadata-agent "$NEUTRON_OVN_BIN_DIR/$NEUTRON_OVN_METADATA_BINARY --config-file $OVN_META_CONF"
# Format logging # Format logging
setup_logging $OVN_META_CONF setup_logging $OVN_META_CONF
fi fi
@ -729,7 +729,7 @@ function _stop_ovs_dp {
} }
function stop_ovn { function stop_ovn {
if is_service_enabled neutron-ovn-metadata-agent; then if is_service_enabled q-ovn-metadata-agent; then
sudo pkill -9 -f haproxy || : sudo pkill -9 -f haproxy || :
stop_process neutron-ovn-metadata-agent stop_process neutron-ovn-metadata-agent
fi fi

View File

@ -38,7 +38,7 @@ disable_all_services
enable_service n-cpu enable_service n-cpu
enable_service placement-client enable_service placement-client
enable_service ovn-controller enable_service ovn-controller
enable_service neutron-ovn-metadata-agent enable_service q-ovn-metadata-agent
# Set this to the address of the main DevStack host running the rest of the # Set this to the address of the main DevStack host running the rest of the
# OpenStack services. # OpenStack services.

View File

@ -32,7 +32,7 @@ LOGFILE=$DEST/logs/stack.sh.log
enable_service ovn-northd enable_service ovn-northd
enable_service ovn-controller enable_service ovn-controller
enable_service neutron-ovn-metadata-agent enable_service q-ovn-metadata-agent
# Use Neutron instead of nova-network # Use Neutron instead of nova-network
disable_service n-net disable_service n-net

View File

@ -58,7 +58,7 @@
ovn-controller: true ovn-controller: true
ovs-vswitchd: true ovs-vswitchd: true
ovsdb-server: true ovsdb-server: true
neutron-ovn-metadata-agent: true q-ovn-metadata-agent: true
br-ex-tcpdump: true br-ex-tcpdump: true
br-int-flows: true br-int-flows: true
q-dhcp: false q-dhcp: false

View File

@ -130,7 +130,7 @@
etcd: false etcd: false
br-ex-tcpdump: true br-ex-tcpdump: true
br-int-flows: true br-int-flows: true
neutron-ovn-metadata-agent: true q-ovn-metadata-agent: true
o-api: true o-api: true
o-hk: true o-hk: true
ovn-controller: true ovn-controller: true
@ -169,7 +169,7 @@
q-l3: false q-l3: false
q-meta: false q-meta: false
q-metering: false q-metering: false
neutron-ovn-metadata-agent: true q-ovn-metadata-agent: true
devstack_localrc: devstack_localrc:
Q_AGENT: ovn Q_AGENT: ovn
Q_ML2_PLUGIN_MECHANISM_DRIVERS: ovn,logger Q_ML2_PLUGIN_MECHANISM_DRIVERS: ovn,logger

View File

@ -237,7 +237,7 @@
n-novnc-cell1: true n-novnc-cell1: true
n-sch: true n-sch: true
n-super-cond: true n-super-cond: true
neutron-ovn-metadata-agent: true q-ovn-metadata-agent: true
o-api: true o-api: true
o-hk: true o-hk: true
ovn-controller: true ovn-controller: true