* Print valid/invalid status on snap validate --monitor <...>
* Also return validation tracking result for enforce (but ignore it in the
client).
* Removed unneeded return statement.
Co-authored-by: Miguel Pires <miguelpires94@gmail.com>
* Add checks for result when using enforce mode.
Co-authored-by: Miguel Pires <miguelpires94@gmail.com>
* many: change transactional flag to an option
Change the --transactional flag to an option called --transaction with
two possible values, "per-snap" and "all-snaps". The former is the
default, and makes updates/installs transactional per snap, while the
latter makes the API call transactional on the specified set of snaps,
so if one fails all the action is reverted.
* tests: adapt to change from --transactional to --transaction=...
* cmd/snap: tweak a bit description of transaction option
* daemon: do some additional checks on transaction option at the API level
* many: address some minor review comments
* Support --ignore-running with InstallMany/UpdateMany.
* Revert install-many related changes.
* Add ignore-running to multiActionData. Add tests.
* Revert uninteded change to TestInstallMany test.
* cmd/snap,client: add support for new cpu quota switches
update tests where neccessary, add new tests
* multiple: update changes for cpu quotas
required after rebasing on top of new master, including some improvements
* cmd/snap: update documentation
* snap: simplify getCGroupVersion and rename to cgroupVersion
Instead of amending the exiting error from `cgroup.Version()`
just improve the underlying error (which is frankly not very
good). The improvement for the error is done in #11558 and
this commit just simplifies the code to use the improved error.
(thanks to Alberto)
* snap: add example cpu quota string
* snap: tweak error message from parseCpuQuota()
* snap: tweak code in parseCpuQuota() to reduce duplication
* snap: tweak error in parseQuotas() for invalid percentage and add test
* snap: tweak --cpu-set error when cgroup v1 is in use
* snap: tweak error message for negative cpu set number
* snap: tweak error message for invalid thread count and add test
* snap: comment/var init tweaks
* snap: simplify format cpu constraint code (thanks to Mardy)
* cmd/snap/cmd_quota: support more than 10 CPUs
* cmd/snap/cmd_quota: simplify error handling
* snap: split TestSetQuotaCpuSetFails() test into two for easier readability
* cmd/snap/cmd_quota: do not allow a negative number of threads
* cmd/snap/cmd_quota_test: test parseQuota() happy cases
Move a few unhappy cases to this test function, as it's actually the
proper place to do these kind of checks.
* cmd/snap/cmd_quota: do not check for the cgroup version
Let the service take care of this check.
* cmd/snap/cmd_quota: fix typo in comment
* cmd/snap/cmd_quota: fix command-line parameter name
* cmd/snap/cmd_quota_test: add a test case
* snap: rename ThreadMax -> ThreadsMax, thread -> threads
* snap: add test that outputs the two `theads=` variants from `snap quotas` (thanks to Pawel for pointing this out)
* cmd/snap: review feedback
remove memory from values when constraint is not set
Co-authored-by: Michael Vogt <mvo@ubuntu.com>
Co-authored-by: Alberto Mardegan <mardy@users.sourceforge.net>
This commit replaces the use of "sanity" with more inclusive
naming.
When `sanity` is used in a more general sense either `validity`
or `quick` is used.