diff options
author | Luc Provoost <luc.provoost@gmail.com> | 2024-11-11 14:16:25 +0100 |
---|---|---|
committer | Luc Provoost <luc.provoost@gmail.com> | 2024-11-11 14:16:25 +0100 |
commit | 83ca566aab6c56041eb575de11969d3eb535b542 (patch) | |
tree | 4622323fcb3f7606a42a5786cc9cc6b30decb978 /VNFs/DPPD-PROX | |
parent | dd2399bf6189c351e11dfe3844ab84c630e25b94 (diff) |
New determination of the cpu set
Check out https://github.com/kubernetes/kubernetes/issues/119669
That describes the problem. The solution can be found in this change.
Signed-off-by: Luc Provoost <luc.provoost@gmail.com>
Change-Id: Id4d47e5d36b1c4acefea8dbe13d7a1e7c499c70d
Diffstat (limited to 'VNFs/DPPD-PROX')
-rw-r--r-- | VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py index 048895c1..63019e44 100644 --- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py +++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_machine.py @@ -83,17 +83,7 @@ class RapidMachine(object): def read_cpuset(self): """Read list of cpus on which we allowed to execute """ - cpu_set_file = '/sys/fs/cgroup/cpuset.cpus' - cmd = 'test -e {0} && echo exists'.format(cpu_set_file) - if (self._client.run_cmd(cmd).decode().rstrip()): - cmd = 'cat {}'.format(cpu_set_file) - else: - cpu_set_file = '/sys/fs/cgroup/cpuset/cpuset.cpus' - cmd = 'test -e {0} && echo exists'.format(cpu_set_file) - if (self._client.run_cmd(cmd).decode().rstrip()): - cmd = 'cat {}'.format(cpu_set_file) - else: - RapidLog.critical('{Cannot determine cpuset') + cmd = "cat /proc/1/task/1/status | grep Cpus_allowed_list | awk '{print $2}'" cpuset_cpus = self._client.run_cmd(cmd).decode().rstrip() RapidLog.debug('{} ({}): Allocated cpuset: {}'.format(self.name, self.ip, cpuset_cpus)) self.cpu_mapping = self.expand_list_format(cpuset_cpus) |