vzctl status, snapshot-list: don't mess with stdout
Even if quiet is set to 1 when parsing "status" argument, it is only
applied after calling vps_parse_config() for global config (vz.conf).
So, in a (rare but possible) case of possible warnings in global config
and vzctl status called with --verbose, it garbles output, for example:
# vzctl --verbose status 121
Warning at /etc/vz/vz.conf:63: unknown parameter SKIP_ARPDETECT
("yes"), ignored
CTID 121 exist mounted running
We could set quiet just before calling vps_parse_config(), but it's even
better to set verbose to -1, this way we can still see some errors
(going to stderr so not garbling our output).
While at it, do the same for vzctl snapshot-list, and roll back
previous vzctl snapshot-list fix (commit 3248826) as it was
only a partial solution and is no longer needed now.
Bug found when doing vzmigrate -vv (which calls vzctl with --verbose).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
2 files changed