diff --git a/nova/virt/libvirt/cpu/core.py b/nova/virt/libvirt/cpu/core.py index 782f028fee3c..8274236850cc 100644 --- a/nova/virt/libvirt/cpu/core.py +++ b/nova/virt/libvirt/cpu/core.py @@ -60,6 +60,7 @@ def set_online(core: int) -> bool: return get_online(core) +@nova.privsep.sys_admin_pctxt.entrypoint def set_offline(core: int) -> bool: filesystem.write_sys(os.path.join(gen_cpu_path(core), 'online'), data='0') return not get_online(core) diff --git a/releasenotes/notes/bug-2022955-eac8b0c8e42e3696.yaml b/releasenotes/notes/bug-2022955-eac8b0c8e42e3696.yaml new file mode 100644 index 000000000000..35d8514a3c3f --- /dev/null +++ b/releasenotes/notes/bug-2022955-eac8b0c8e42e3696.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + The `CPU power management`_ feature has been fixed to use privsep to avoid + a FileNotFound error when offlining CPUs. + + .. _CPU power management: https://docs.openstack.org/nova/latest/admin/cpu-topologies.html#configuring-cpu-power-management-for-dedicated-cores