-
Notifications
You must be signed in to change notification settings - Fork 95
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
Limit host resources via Hammer CLI #3575
base: master
Are you sure you want to change the base?
Limit host resources via Hammer CLI #3575
Conversation
The PR preview for b95fd30 is available at theforeman-foreman-documentation-preview-pr-3575.surge.sh The following output files are affected by this PR: |
$ hammer user update \ | ||
--id _My_User_ID_ \ | ||
--resource-quota-ids _My_Resource_Quota_IDs_ \ | ||
--resource-quota-is-optional _[true|false]_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you accept this? Is there a more idiomatic way of saying "either this or that, but not both or none"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about choosing one and making clear that it's an example? Like this:
"Assign resource quotas to a user. For example, to [...] while making resource quotas optional:
[...]
$ hammer user update [...] --reqource-quota-is-optional true"
And then you already refer users to --help, which gives them a clear signal where to go for all the other details.
05b6053
to
570ebdf
Compare
* Add command to install Hammer CLI plugin for foreman_resource_quota * Use Hammer CLI to assign resource quotes to users * Use Hammer CLI to manage resource quotas Refs PR 7 in hammer-cli-foreman-resource-quota on GitHub Refs PR 97 in foreman_resource_quota on GitHub Refs https://github.com/ATIX-AG/hammer-cli-foreman-resource-quota/
570ebdf
to
b95fd30
Compare
---- | ||
+ | ||
If you set the value to `0`, users cannot consume any resource at all. | ||
To reset resource quotas, you can use `--remove-cpu-cores-limit`, `--remove-disk-space-limit`, and `--remove-memory-limit`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me overally. I just have a concern regarding the units...
--cpu-cores _My_CPU_Cores_ \ | ||
--disk-space _My_Disk_Space_in_GiB_ \ | ||
--id _My_Resource_Quota_ID_ \ | ||
--memory _My_Memory_in_MiB_ \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you absolutely sure that the unit is MebiBytes (MiB) and not MegaBytes (MB)? Those are different units. And Mi- Gi- aren't usually used. 🤷♀️
The same for the GiB above and other places.
What changes are you introducing?
Why are you introducing these changes? (Explanation, links to references, issues, etc.)
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
Checklists
no cherry-picks: only foreman_resource_quota is part of 3.13; the Hammer CLI plugin is not available in nightly.