Comment 15 for bug 2056613

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to nova (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/nova/+/913225
Committed: https://opendev.org/openstack/nova/commit/874acc1ed16d3125db16add1e03dea65d8c542ca
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 874acc1ed16d3125db16add1e03dea65d8c542ca
Author: Artom Lifshitz <email address hidden>
Date: Fri Mar 8 13:00:30 2024 -0500

    pwr mgmt: make API into a per-driver object

    We want to test power management in our functional tests in multinode
    scenarios (ex: live migration).

    This was previously impossible because all the methods in
    nova.virt.libvirt.cpu.api and were at the module level, meaning both
    source and destination libvirt drivers would call the same method to
    online and offline cores. This made it impossible to maintain distinct
    core power state between source and destination.

    This patch inserts a nova.virt.libvirt.cpu.api.API class, and gives
    the libvirt driver a cpu_api attribute with an instance of that
    class. Along with the tiny API.core() helper, this allows new
    functional tests in the subsequent patches to stub out the core
    "model" code with distinct objects on the source and destination
    libvirt drivers, and enables a whole bunch of testing (and fixes!)
    around live migration.

    Related-bug: 2056613
    Change-Id: I052535249b9a3e144bb68b8c588b5995eb345b97
    (cherry picked from commit 29dc044a7aa1b1dd35ea4695c055feb5136ba1e5)
    (cherry picked from commit 2a0e63828b6fefc1e83349f0bdac7f9eb8ea6678)