Remove n-cells, n-net and n-cauth
Remove nova cells v1 support, which also allows/necessitates removing
support for nova networks (which was only supported with cells v1) and
nova-consoleauth (which was required by cells v1 but is unnecessary
otherwise).
The Depends-On isn't really necessary, but it's here to make sure this
doesn't merge until we _really_ have killed cells v1.
I honestly expected this patch would be bigger.
Change-Id: I90316208d1af42c1659d3bee386f95e38aaf2c56
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: Ib0e0b708c46e4330e51f8f8fdfbb02d45aaf0f44
diff --git a/lib/neutron-legacy b/lib/neutron-legacy
index 8257115..87edc5a 100644
--- a/lib/neutron-legacy
+++ b/lib/neutron-legacy
@@ -50,8 +50,6 @@
# See "Neutron Network Configuration" below for additional variables
# that must be set in localrc for connectivity across hosts with
# Neutron.
-#
-# With Neutron networking the NETWORK_MANAGER variable is ignored.
# Settings
# --------
diff --git a/lib/nova b/lib/nova
index 6ce1dcc..2efe7cb 100644
--- a/lib/nova
+++ b/lib/nova
@@ -50,11 +50,9 @@
NOVA_CONF_DIR=/etc/nova
NOVA_CONF=$NOVA_CONF_DIR/nova.conf
-NOVA_CELLS_CONF=$NOVA_CONF_DIR/nova-cells.conf
NOVA_COND_CONF=$NOVA_CONF_DIR/nova.conf
NOVA_CPU_CONF=$NOVA_CONF_DIR/nova-cpu.conf
NOVA_FAKE_CONF=$NOVA_CONF_DIR/nova-fake.conf
-NOVA_CELLS_DB=${NOVA_CELLS_DB:-nova_cell}
NOVA_API_DB=${NOVA_API_DB:-nova_api}
NOVA_UWSGI=$NOVA_BIN_DIR/nova-api-wsgi
NOVA_METADATA_UWSGI=$NOVA_BIN_DIR/nova-metadata-wsgi
@@ -111,7 +109,6 @@
# Set default defaults here as some hypervisor drivers override these
PUBLIC_INTERFACE_DEFAULT=br100
-FLAT_NETWORK_BRIDGE_DEFAULT=br100
# Set ``GUEST_INTERFACE_DEFAULT`` to some interface on the box so that
# the default isn't completely crazy. This will match ``eth*``, ``em*``, or
# the new ``p*`` interfaces, then basically picks the first
@@ -137,44 +134,6 @@
source $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER
fi
-
-# Nova Network Configuration
-# --------------------------
-
-NETWORK_MANAGER=${NETWORK_MANAGER:-${NET_MAN:-FlatDHCPManager}}
-
-VLAN_INTERFACE=${VLAN_INTERFACE:-$GUEST_INTERFACE_DEFAULT}
-FLAT_NETWORK_BRIDGE=${FLAT_NETWORK_BRIDGE:-$FLAT_NETWORK_BRIDGE_DEFAULT}
-
-# If you are using the FlatDHCP network mode on multiple hosts, set the
-# ``FLAT_INTERFACE`` variable but make sure that the interface doesn't already
-# have an IP or you risk breaking things.
-#
-# **DHCP Warning**: If your flat interface device uses DHCP, there will be a
-# hiccup while the network is moved from the flat interface to the flat network
-# bridge. This will happen when you launch your first instance. Upon launch
-# you will lose all connectivity to the node, and the VM launch will probably
-# fail.
-#
-# If you are running on a single node and don't need to access the VMs from
-# devices other than that node, you can set ``FLAT_INTERFACE=``
-# This will stop nova from bridging any interfaces into ``FLAT_NETWORK_BRIDGE``.
-FLAT_INTERFACE=${FLAT_INTERFACE:-$GUEST_INTERFACE_DEFAULT}
-
-# ``MULTI_HOST`` is a mode where each compute node runs its own network node. This
-# allows network operations and routing for a VM to occur on the server that is
-# running the VM - removing a SPOF and bandwidth bottleneck.
-MULTI_HOST=$(trueorfalse False MULTI_HOST)
-
-# ``NOVA_ALLOW_MOVE_TO_SAME_HOST`` can be set to False in multi node DevStack,
-# where there are at least two nova-computes.
-NOVA_ALLOW_MOVE_TO_SAME_HOST=$(trueorfalse True NOVA_ALLOW_MOVE_TO_SAME_HOST)
-
-# Test floating pool and range are used for testing. They are defined
-# here until the admin APIs can replace nova-manage
-TEST_FLOATING_POOL=${TEST_FLOATING_POOL:-test}
-TEST_FLOATING_RANGE=${TEST_FLOATING_RANGE:-192.168.253.0/29}
-
# Other Nova configurations
# ----------------------------
@@ -183,6 +142,10 @@
# and Glance.
NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN)
+# ``NOVA_ALLOW_MOVE_TO_SAME_HOST`` can be set to False in multi node DevStack,
+# where there are at least two nova-computes.
+NOVA_ALLOW_MOVE_TO_SAME_HOST=$(trueorfalse True NOVA_ALLOW_MOVE_TO_SAME_HOST)
+
# Enable debugging levels for iscsid service (goes from 0-8)
ISCSID_DEBUG=$(trueorfalse False ISCSID_DEBUG)
ISCSID_DEBUG_LEVEL=${ISCSID_DEBUG_LEVEL:-4}
@@ -198,13 +161,6 @@
return 1
}
-# Test if any Nova Cell services are enabled
-# is_nova_enabled
-function is_n-cell_enabled {
- [[ ,${ENABLED_SERVICES} =~ ,"n-cell" ]] && return 0
- return 1
-}
-
# is_nova_console_proxy_compute_tls_enabled() - Test if the Nova Console Proxy
# service has TLS enabled
function is_nova_console_proxy_compute_tls_enabled {
@@ -501,10 +457,6 @@
if [ -n "$NOVA_INSTANCES_PATH" ]; then
iniset $NOVA_CONF DEFAULT instances_path "$NOVA_INSTANCES_PATH"
fi
- if [ "$MULTI_HOST" != "False" ]; then
- iniset $NOVA_CONF DEFAULT multi_host "True"
- iniset $NOVA_CONF DEFAULT send_arp_for_ha "True"
- fi
if [ "$SYSLOG" != "False" ]; then
iniset $NOVA_CONF DEFAULT use_syslog "True"
fi
@@ -551,21 +503,6 @@
iniset $NOVA_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
- # Setup logging for nova-dhcpbridge command line
- sudo cp "$NOVA_CONF" "$NOVA_CONF_DIR/nova-dhcpbridge.conf"
-
- if is_service_enabled n-net; then
- local service="n-dhcp"
- local logfile="${service}.log.${CURRENT_LOG_TIME}"
- local real_logfile="${LOGDIR}/${logfile}"
- if [[ -n ${LOGDIR} ]]; then
- bash -c "cd '$LOGDIR' && ln -sf '$logfile' ${service}.log"
- iniset "$NOVA_CONF_DIR/nova-dhcpbridge.conf" DEFAULT log_file "$real_logfile"
- fi
-
- iniset $NOVA_CONF DEFAULT dhcpbridge_flagfile "$NOVA_CONF_DIR/nova-dhcpbridge.conf"
- fi
-
if [ "$NOVA_USE_SERVICE_TOKEN" == "True" ]; then
init_nova_service_user_conf
fi
@@ -748,42 +685,6 @@
echo "${NOVA_CONF_DIR}/nova_cell${cell}.conf"
}
-function init_nova_cells {
- if is_service_enabled n-cell; then
- cp $NOVA_CONF $NOVA_CELLS_CONF
- iniset $NOVA_CELLS_CONF database connection `database_connection_url $NOVA_CELLS_DB`
- rpc_backend_add_vhost child_cell
- iniset_rpc_backend nova $NOVA_CELLS_CONF DEFAULT child_cell
- iniset $NOVA_CELLS_CONF DEFAULT dhcpbridge_flagfile $NOVA_CELLS_CONF
- iniset $NOVA_CELLS_CONF cells enable True
- iniset $NOVA_CELLS_CONF cells cell_type compute
- iniset $NOVA_CELLS_CONF cells name child
-
- iniset $NOVA_CONF cells enable True
- iniset $NOVA_CONF cells cell_type api
- iniset $NOVA_CONF cells name region
-
- if is_service_enabled n-api-meta; then
- NOVA_ENABLED_APIS=$(echo $NOVA_ENABLED_APIS | sed "s/,metadata//")
- iniset $NOVA_CONF DEFAULT enabled_apis $NOVA_ENABLED_APIS
- iniset $NOVA_CELLS_CONF DEFAULT enabled_apis metadata
- fi
-
- # Cells v1 conductor should be the nova-cells.conf
- NOVA_COND_CONF=$NOVA_CELLS_CONF
-
- time_start "dbsync"
- $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF db sync
- time_stop "dbsync"
- $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell create --name=region --cell_type=parent --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=/ --woffset=0 --wscale=1
- $NOVA_BIN_DIR/nova-manage cell create --name=child --cell_type=child --username=$RABBIT_USERID --hostname=$RABBIT_HOST --port=5672 --password=$RABBIT_PASSWORD --virtual_host=child_cell --woffset=0 --wscale=1
-
- # Creates the single cells v2 cell for the child cell (v1) nova db.
- $NOVA_BIN_DIR/nova-manage --config-file $NOVA_CELLS_CONF cell_v2 create_cell \
- --transport-url $(get_transport_url child_cell) --name 'cell1'
- fi
-}
-
# create_nova_cache_dir() - Part of the init_nova() process
function create_nova_cache_dir {
# Create cache dir
@@ -791,18 +692,6 @@
rm -f $NOVA_AUTH_CACHE_DIR/*
}
-function create_nova_conf_nova_network {
- local public_interface=${PUBLIC_INTERFACE:-$PUBLIC_INTERFACE_DEFAULT}
- iniset $NOVA_CONF DEFAULT network_manager "nova.network.manager.$NETWORK_MANAGER"
- iniset $NOVA_CONF DEFAULT public_interface "$public_interface"
- iniset $NOVA_CONF DEFAULT vlan_interface "$VLAN_INTERFACE"
- iniset $NOVA_CONF DEFAULT flat_network_bridge "$FLAT_NETWORK_BRIDGE"
- if [ -n "$FLAT_INTERFACE" ]; then
- iniset $NOVA_CONF DEFAULT flat_interface "$FLAT_INTERFACE"
- fi
- iniset $NOVA_CONF DEFAULT use_neutron False
-}
-
# create_nova_keys_dir() - Part of the init_nova() process
function create_nova_keys_dir {
# Create keys dir
@@ -834,10 +723,6 @@
# Migrate nova and nova_cell0 databases.
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db sync
- if is_service_enabled n-cell; then
- recreate_database $NOVA_CELLS_DB
- fi
-
# Run online migrations on the new databases
# Needed for flavor conversion
$NOVA_BIN_DIR/nova-manage --config-file $NOVA_CONF db online_data_migrations
@@ -942,15 +827,6 @@
export PATH=$old_path
}
-# Detect and setup conditions under which singleconductor setup is
-# needed. Notably cellsv1.
-function _set_singleconductor {
- # NOTE(danms): Don't setup conductor fleet for cellsv1
- if is_service_enabled n-cell; then
- CELLSV2_SETUP="singleconductor"
- fi
-}
-
# start_nova_compute() - Start the compute process
function start_nova_compute {
@@ -958,11 +834,7 @@
local old_path=$PATH
export PATH=$NOVA_BIN_DIR:$PATH
- if is_service_enabled n-cell; then
- local compute_cell_conf=$NOVA_CELLS_CONF
- else
- local compute_cell_conf=$NOVA_CONF
- fi
+ local compute_cell_conf=$NOVA_CONF
cp $compute_cell_conf $NOVA_CPU_CONF
@@ -1025,22 +897,7 @@
export PATH=$NOVA_BIN_DIR:$PATH
local api_cell_conf=$NOVA_CONF
- if is_service_enabled n-cell; then
- local compute_cell_conf=$NOVA_CELLS_CONF
- else
- local compute_cell_conf=$NOVA_CONF
- fi
-
- # ``run_process`` checks ``is_service_enabled``, it is not needed here
- run_process n-cell-region "$NOVA_BIN_DIR/nova-cells --config-file $api_cell_conf"
- run_process n-cell-child "$NOVA_BIN_DIR/nova-cells --config-file $compute_cell_conf"
-
- if is_service_enabled n-net; then
- if ! running_in_container; then
- enable_kernel_bridge_firewall
- fi
- fi
- run_process n-net "$NOVA_BIN_DIR/nova-network --config-file $compute_cell_conf"
+ local compute_cell_conf=$NOVA_CONF
run_process n-sch "$NOVA_BIN_DIR/nova-scheduler --config-file $compute_cell_conf"
if [ "$NOVA_USE_MOD_WSGI" == "False" ]; then
@@ -1049,9 +906,6 @@
run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
fi
- # nova-consoleauth always runs globally
- run_process n-cauth "$NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf"
-
export PATH=$old_path
}
@@ -1129,11 +983,7 @@
# happen between here and the script ending. However, in multinode
# tests this can very often not be the case. So ensure that the
# compute is up before we move on.
- if is_service_enabled n-cell; then
- # cells v1 can't complete the check below because it munges
- # hostnames with cell information (grumble grumble).
- return
- fi
+
# TODO(sdague): honestly, this probably should be a plug point for
# an external system.
if [[ "$VIRT_DRIVER" == 'xenserver' ]]; then
@@ -1145,8 +995,6 @@
}
function start_nova {
- # this catches the cells v1 case early
- _set_singleconductor
start_nova_rest
start_nova_console_proxies
start_nova_conductor
@@ -1174,7 +1022,7 @@
function stop_nova_rest {
# Kill the non-compute nova processes
- for serv in n-api n-api-meta n-net n-sch n-cauth n-cell n-cell; do
+ for serv in n-api n-api-meta n-sch; do
stop_process $serv
done
}
diff --git a/lib/nova_plugins/hypervisor-xenserver b/lib/nova_plugins/hypervisor-xenserver
index 6f79e4f..2fdbde1 100644
--- a/lib/nova_plugins/hypervisor-xenserver
+++ b/lib/nova_plugins/hypervisor-xenserver
@@ -24,9 +24,6 @@
# Defaults
# --------
-# Allow ``build_domU.sh`` to specify the flat network bridge via kernel args
-FLAT_NETWORK_BRIDGE_DEFAULT=$(sed -e 's/.* flat_network_bridge=\([[:alnum:]]*\).*$/\1/g' /proc/cmdline)
-
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
diff --git a/lib/tempest b/lib/tempest
index 95b138c..9f1b677 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -342,7 +342,7 @@
iniset $TEMPEST_CONFIG compute flavor_ref $flavor_ref
iniset $TEMPEST_CONFIG compute flavor_ref_alt $flavor_ref_alt
iniset $TEMPEST_CONFIG validation connect_method $ssh_connect_method
- if ! is_service_enabled n-cell && ! is_service_enabled neutron; then
+ if ! is_service_enabled neutron; then
iniset $TEMPEST_CONFIG compute fixed_network_name $PRIVATE_NETWORK_NAME
fi
@@ -391,24 +391,6 @@
iniset $TEMPEST_CONFIG compute-feature-enabled scheduler_enabled_filters ${NOVA_FILTERS}
fi
- if is_service_enabled n-cell; then
- # Cells doesn't support shelving/unshelving
- iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
- # Cells doesn't support hot-plugging virtual interfaces.
- iniset $TEMPEST_CONFIG compute-feature-enabled interface_attach False
- # Cells v1 doesn't support the rescue/unrescue tests in Tempest
- iniset $TEMPEST_CONFIG compute-feature-enabled rescue False
-
- if [[ -z "$DEFAULT_INSTANCE_TYPE" ]]; then
- # Cells supports resize but does not currently work with devstack
- # because of the custom flavors created for Tempest runs which are
- # not in the cells database.
- # TODO(mriedem): work on adding a nova-manage command to sync
- # flavors into the cells database.
- iniset $TEMPEST_CONFIG compute-feature-enabled resize False
- fi
- fi
-
if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then
iniset $TEMPEST_CONFIG compute-feature-enabled volume_multiattach True
fi
@@ -554,8 +536,7 @@
iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
iniset $TEMPEST_CONFIG compute-feature-enabled snapshot False
iniset $TEMPEST_CONFIG compute-feature-enabled suspend False
- elif ! is_service_enabled n-cell; then
- # cells v1 does not support swapping volumes
+ else
iniset $TEMPEST_CONFIG compute-feature-enabled swap_volume True
fi
fi