tools/xenstore: add control command for setting and showing quota

Add a xenstore-control command "quota" to:
- show current quota settings
- change quota settings
- show current quota related values of a domain

Note that in the case the new quota is lower than existing one,
Xenstored may continue to handle requests from a domain exceeding the
new limit (depends on which one has been broken) and the amount of
resource used will not change. However the domain will not be able to
create more resource (associated to the quota) until it is back to below
the limit.

This is part of XSA-326.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
This commit is contained in:
Juergen Gross authored and Andrew Cooper committed 2022-11-01 13:05:44 +00:00
1 parent 1da16d5990
commit 9c484bef83
4 files changed
+157

No files matched your search

+11
View File
@@ -410,6 +410,17 @@ CONTROL <command>|[<parameters>|]
print|<string>
print <string> to syslog (xenstore runs as daemon) or
to console (xenstore runs as stubdom)
quota|[set <name> <val>|<domid>]
without parameters: print the current quota settings
with "set <name> <val>": set the quota <name> to new value
<val> (The admin should make sure all the domain usage is
below the quota. If it is not, then Xenstored may continue to
handle requests from the domain as long as the resource
violating the new quota setting isn't increased further)
with "<domid>": print quota related accounting data for
the domain <domid>
quota-soft|[set <name> <val>]
like the "quota" command, but for soft-quota.
help <supported-commands>
return list of supported commands for CONTROL
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.