[Devel] [PATCH libvzctl] scripts: Ask to increase verbosity in case of error
Cyrill Gorcunov
gorcunov at virtuozzo.com
Fri Jun 24 09:42:27 PDT 2016
With nonverbose checkpoint/resume it's hard to figure
out what is gone wrong. So ask an admin to increase
verbosity.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
scripts/vz-cpt.in | 3 +++
scripts/vz-rst.in | 3 +++
2 files changed, 6 insertions(+)
diff --git a/scripts/vz-cpt.in b/scripts/vz-cpt.in
index e44734d..ca35f6e 100755
--- a/scripts/vz-cpt.in
+++ b/scripts/vz-cpt.in
@@ -111,6 +111,9 @@ if [ $? -ne 0 ]; then
mv -f $dumpdir $VE_DUMP_DIR.fail
echo Failed to checkpoint the Container
echo All dump files and logs were saved to $VE_DUMP_DIR.fail
+ if [ "$CRIU_LOGLEVEL" -lt "4" ]; then
+ echo "Please consider running checkpoint/suspend with --verbose option"
+ fi
exit 1
else
mv $dumpdir $VE_DUMP_DIR
diff --git a/scripts/vz-rst.in b/scripts/vz-rst.in
index dbf1cad..1e96de7 100755
--- a/scripts/vz-rst.in
+++ b/scripts/vz-rst.in
@@ -129,5 +129,8 @@ if [ $? -eq 0 ]; then
echo Ok
else
echo The restore log was saved in $VE_WORK_DIR/$VE_RESTORE_LOG_PATH
+ if [ "$CRIU_LOGLEVEL" -lt "4" ]; then
+ echo "Please consider running restore/resume with --verbose option"
+ fi
exit 1
fi
--
2.5.5
More information about the Devel
mailing list