Skip to content

Commit 308633f

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "cpu: fix the privsep issue when offlining the cpu"
2 parents a4ca440 + 3fab437 commit 308633f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

nova/virt/libvirt/cpu/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def set_online(core: int) -> bool:
6060
return get_online(core)
6161

6262

63+
@nova.privsep.sys_admin_pctxt.entrypoint
6364
def set_offline(core: int) -> bool:
6465
filesystem.write_sys(os.path.join(gen_cpu_path(core), 'online'), data='0')
6566
return not get_online(core)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
fixes:
3+
- |
4+
The `CPU power management`_ feature has been fixed to use privsep to avoid
5+
a FileNotFound error when offlining CPUs.
6+
7+
.. _CPU power management: https://docs.openstack.org/nova/latest/admin/cpu-topologies.html#configuring-cpu-power-management-for-dedicated-cores

0 commit comments

Comments
 (0)