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"
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
else
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=False
@ -519,7 +519,7 @@ function configure_ovn_plugin {
fi
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
fi
fi
@ -538,7 +538,7 @@ function configure_ovn {
fi
# 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
mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2
@ -655,8 +655,8 @@ function _start_ovn_services {
if is_service_enabled ovn-controller-vtep ; then
_start_process "devstack@ovn-controller-vtep.service"
fi
if is_service_enabled neutron-ovn-metadata-agent; then
_start_process "devstack@neutron-ovn-metadata-agent.service"
if is_service_enabled q-ovn-metadata-agent; then
_start_process "devstack@q-ovn-metadata-agent.service"
fi
}
@ -695,8 +695,8 @@ function start_ovn {
_run_process ovn-controller-vtep "$cmd" "" "$STACK_GROUP" "root"
fi
if is_service_enabled neutron-ovn-metadata-agent; then
run_process neutron-ovn-metadata-agent "$NEUTRON_OVN_BIN_DIR/$NEUTRON_OVN_METADATA_BINARY --config-file $OVN_META_CONF"
if is_service_enabled q-ovn-metadata-agent; then
run_process q-ovn-metadata-agent "$NEUTRON_OVN_BIN_DIR/$NEUTRON_OVN_METADATA_BINARY --config-file $OVN_META_CONF"
# Format logging
setup_logging $OVN_META_CONF
fi
@ -729,7 +729,7 @@ function _stop_ovs_dp {
}
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 || :
stop_process neutron-ovn-metadata-agent
fi

View File

@ -38,7 +38,7 @@ disable_all_services
enable_service n-cpu
enable_service placement-client
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
# OpenStack services.

View File

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

View File

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

View File

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

View File

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