Use 2nd RPC server in compute operations

For graceful shutdown of compute service, it will have two RPC servers.
One RPC server is used for the new requests which will be stopped during
graceful shutdown and 2nd RPC server (listen on 'compute-alt' topic)
will be used to complete the in-progress operations.

We select the operations (case by case) and their RPC method to use
the 2nd PRC server so that they will not be interupted on shutdown
initiative and graceful shutdown time will keep 2nd RPC server active
for graceful_shutdown_timeout. A new method 'prepare_for_alt_rpcserver'
is added which will fallback to first RPC server if it detect the old
compute.

As this is upgrade impact, it bumps the compute/service version, adds
releasenotes for the same.

The list of operations who should use the 2nd RPC server will grow
evanutally and this commit moves the below operations to use the 2nd
RPC server:

* Live migration

  - Live migration: It use 2nd RPC servers and will try to complete
    the operation during shutdown.
  - live_migration_force_complete does not need to use 2nd RPC server.
    It is direct RPC request from API to compute and if that is
    rejected during shutdown, it is fine and can be initiated again
    once compute is up.
  - live_migration_abort does not need to use 2nd RPC server. Ditto,
    it is direct RPC request from API to compute. It cancel the queue
    live migration but if migration is already started, then driver
    cancel the migration. If it is rejected during shutdown because of
    RPC is stopped, it is fine and can be initiated again.

* server external event
* Get server console

As graceful shutdown cannot be tested in tempest, this adds a new job
to test it. Currently it test the live migration operation which can
be extended to other operations who will use 2nd RPC server.

Partial implement blueprint nova-services-graceful-shutdown-part1

Change-Id: I4de3afbcfaefbed909a29a831ac18060c4a73246
Signed-off-by: Ghanshyam Maan <gmaan.os14@gmail.com>
This commit is contained in:
Ghanshyam Maan
2026-02-19 02:48:45 +00:00
parent 4bce4480b9
commit d5ffb58a8d
14 changed files with 510 additions and 22 deletions
+41
View File
@@ -138,6 +138,44 @@
block_migrate_cinder_iscsi: true
post-run: playbooks/nova-live-migration/post-run.yaml
- job:
name: nova-graceful-shutdown
parent: devstack-multinode
description: |
Run Nova graceful shutdown tests.
run: playbooks/nova-graceful-shutdown/run.yaml
timeout: 10800
vars:
devstack_services:
neutron-trunk: true
openstack-cli-server: true
s-account: false
s-container: false
s-object: false
s-proxy: false
c-bak: false
tempest_test_regex: ''
devstack_localrc:
<<: *uec_image_vars
SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT: 180
NOVA_ALLOW_MOVE_TO_SAME_HOST: false
LIVE_MIGRATION_AVAILABLE: true
USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION: true
group-vars:
subnode:
devstack_services:
openstack-cli-server: true
s-account: false
s-container: false
s-object: false
s-proxy: false
c-bak: false
devstack_localrc:
SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT: 180
NOVA_ALLOW_MOVE_TO_SAME_HOST: false
LIVE_MIGRATION_AVAILABLE: true
USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION: true
- job:
name: nova-alt-configurations
parent: tempest-multinode-full-py3
@@ -829,6 +867,9 @@
- ^nova/network/.*$
- nova/virt/libvirt/vif.py
- nova-live-migration
# NOTE(gmaan): We will be running the graceful shutdown testing in
# check pipeline only and not required to test in gate as such.
- nova-graceful-shutdown
- nova-live-migration-ceph
- nova-lvm
- nova-multi-cell