cpu: fix the privsep issue when offlining the cpu
In Icb913ed9be8d508de35e755a9c650ba25e45aca2 we forgot to add a privsep decorator for the set_offline() method. Change-Id: I769d35907ab9466fe65b942295fd7567a757087a Closes-Bug: #2022955
This commit is contained in:
parent
971809b4d4
commit
3fab43786b
@ -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)
|
||||
|
7
releasenotes/notes/bug-2022955-eac8b0c8e42e3696.yaml
Normal file
7
releasenotes/notes/bug-2022955-eac8b0c8e42e3696.yaml
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user