Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set AllowedCPUs= by detecting number of cpus on target system #24

Closed
lsm5 opened this issue Apr 26, 2023 · 1 comment · Fixed by #25
Closed

Set AllowedCPUs= by detecting number of cpus on target system #24

lsm5 opened this issue Apr 26, 2023 · 1 comment · Fixed by #25
Assignees

Comments

@lsm5
Copy link
Member

lsm5 commented Apr 26, 2023

AllowedCPUs=6-11

This is currently hardcoded and can fail on systems which don't have enough cpus.

This can probably go into a post install script for the rpm.

@lsm5 lsm5 self-assigned this Apr 26, 2023
@rhatdan
Copy link
Member

rhatdan commented Apr 26, 2023

Value should be

$ nproc=$(nproc)
$ (expr $nproc / 2)"-"$(expr $nproc - 1)
6-11

lsm5 added a commit to lsm5/qm that referenced this issue Apr 27, 2023
lsm5 added a commit to lsm5/qm that referenced this issue Apr 27, 2023
Also set %%{_datadir}/containers/systemd/qm.container as
%%config(noreplace).

Fixes: containers#24

Signed-off-by: Lokesh Mandvekar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants