Comment 2 for bug 2056613

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

Reviewed: https://review.opendev.org/c/openstack/nova/+/912320
Committed: https://opendev.org/openstack/nova/commit/29dc044a7aa1b1dd35ea4695c055feb5136ba1e5
Submitter: "Zuul (22348)"
Branch: master

commit 29dc044a7aa1b1dd35ea4695c055feb5136ba1e5
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