Skip to content

Commit

Permalink
enable multinode supprot for spice and serial proxy
Browse files Browse the repository at this point in the history
This change mirrors change Ie02734bb598d27560cf5d674c9e1d9b8dca3801f
which ensure that its posible to enable vnc for vms on compute nodes
without deploying the vnc proxy.

In this change two new flags are added NOVA_SPICE_ENABLED and
NOVA_SERIAL_ENABLED to enable configuration of the relevent console

create_nova_conf is also modifed to include the db url if the console
proxies are deployed on a host.

As spice supprot is nolonger avaible in qemu as packged by ubuntu 24.04
and centos 9 a devstack-two-node-debian-bookworm to allow testing with
spice in a multinode job.

Change-Id: Ie944e518122f2b0059f28acbf68fb7ad0a560ca4
  • Loading branch information
SeanMooney committed Feb 10, 2025
1 parent a08a53d commit 4a1d242
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,36 @@
- compute1
- compute2

- nodeset:
name: devstack-two-node-debian-bookworm
nodes:
- name: controller
label: debian-bookworm
- name: compute1
label: debian-bookworm
groups:
# Node where tests are executed and test results collected
- name: tempest
nodes:
- controller
# Nodes running the compute service
- name: compute
nodes:
- controller
- compute1
# Nodes that are not the controller
- name: subnode
nodes:
- compute1
# Switch node for multinode networking setup
- name: switch
nodes:
- controller
# Peer nodes for multinode networking setup
- name: peers
nodes:
- compute1

- job:
name: devstack-base
parent: openstack-multinode-fips
Expand Down
9 changes: 6 additions & 3 deletions lib/nova
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ QEMU_CONF=/etc/libvirt/qemu.conf
# ``NOVA_VNC_ENABLED`` can be used to forcibly enable VNC configuration.
# In multi-node setups allows compute hosts to not run ``n-novnc``.
NOVA_VNC_ENABLED=$(trueorfalse False NOVA_VNC_ENABLED)
# same as ``NOVA_VNC_ENABLED`` but for Spice and serial console respectively.
NOVA_SPICE_ENABLED=$(trueorfalse False NOVA_SPICE_ENABLED)
NOVA_SERIAL_ENABLED=$(trueorfalse False NOVA_SERIAL_ENABLED)

# Get hypervisor configuration
# ----------------------------
Expand Down Expand Up @@ -464,7 +467,7 @@ function create_nova_conf {
# only setup database connections and cache backend if there are services
# that require them running on the host. The ensures that n-cpu doesn't
# leak a need to use the db in a multinode scenario.
if is_service_enabled n-api n-cond n-sched; then
if is_service_enabled n-api n-cond n-sched n-spice n-novnc n-sproxy; then
# If we're in multi-tier cells mode, we want our control services pointing
# at cell0 instead of cell1 to ensure isolation. If not, we point everything
# at the main database like normal.
Expand Down Expand Up @@ -716,7 +719,7 @@ function configure_console_compute {
iniset $NOVA_CPU_CONF vnc enabled false
fi

if is_service_enabled n-spice; then
if is_service_enabled n-spice || [ "$NOVA_SPICE_ENABLED" != False ]; then
# Address on which instance spiceservers will listen on compute hosts.
# For multi-host, this should be the management ip of the compute host.
SPICESERVER_PROXYCLIENT_ADDRESS=${SPICESERVER_PROXYCLIENT_ADDRESS:-$default_proxyclient_addr}
Expand All @@ -726,7 +729,7 @@ function configure_console_compute {
iniset $NOVA_CPU_CONF spice server_proxyclient_address "$SPICESERVER_PROXYCLIENT_ADDRESS"
fi

if is_service_enabled n-sproxy; then
if is_service_enabled n-sproxy || [ "$NOVA_SERIAL_ENABLED" != False ]; then
iniset $NOVA_CPU_CONF serial_console enabled True
iniset $NOVA_CPU_CONF serial_console base_url "ws://$SERVICE_HOST:$((6082 + offset))/"
fi
Expand Down
8 changes: 7 additions & 1 deletion lib/tempest
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,15 @@ function configure_tempest {
iniset $TEMPEST_CONFIG compute-feature-enabled volume_multiattach True
fi

if is_service_enabled n-novnc; then
if is_service_enabled n-novnc || [ "$NOVA_VNC_ENABLED" != False ]; then
iniset $TEMPEST_CONFIG compute-feature-enabled vnc_console True
fi
if is_service_enabled n-spice || [ "$NOVA_SPICE_ENABLED" != False ]; then
iniset $TEMPEST_CONFIG compute-feature-enabled spice_console True
fi
if is_service_enabled n-sproxy || [ "$NOVA_SERIAL_ENABLED" != False ]; then
iniset $TEMPEST_CONFIG compute-feature-enabled serial_console True
fi

# Network
iniset $TEMPEST_CONFIG network project_networks_reachable false
Expand Down

0 comments on commit 4a1d242

Please sign in to comment.