[CRIU] [PATCH] p.haul: forward correct verbosity level to criu restore
Nikita Spiridonov
nspiridonov at virtuozzo.com
Wed May 4 06:27:07 PDT 2016
Forward correct verbosity level to criu restore during Virtuozzo
containers live migration.
Signed-off-by: Nikita Spiridonov <nspiridonov at virtuozzo.com>
---
phaul/p_haul_vz.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/phaul/p_haul_vz.py b/phaul/p_haul_vz.py
index 8f33a17..ffcd83c 100644
--- a/phaul/p_haul_vz.py
+++ b/phaul/p_haul_vz.py
@@ -7,6 +7,7 @@ import subprocess
import shlex
import logging
import criu_cr
+import criu_api
import util
import fs_haul_ploop
import pycriu.rpc
@@ -45,6 +46,7 @@ class p_haul_type:
# v_bridge is the bridge to which thie veth is attached
#
self._veths = []
+ self.__verbose = criu_api.def_verb
def __load_ct_config(self, path):
logging.info("Loading config file from %s", path)
@@ -117,7 +119,7 @@ class p_haul_type:
self.__load_ct_config_dst(vz_conf_dir)
def set_options(self, opts):
- pass
+ self.__verbose = opts["verbose"]
def adjust_criu_req(self, req):
"""Add module-specific options to criu request"""
@@ -154,7 +156,8 @@ class p_haul_type:
extra_args = [
"VE_WORK_DIR={0}\n".format(img.work_dir()),
"VE_RESTORE_LOG_PATH={0}\n".format(
- connection.get_log_name(pycriu.rpc.RESTORE))]
+ connection.get_log_name(pycriu.rpc.RESTORE)),
+ "VE_CRIU_LOGLEVEL={0}\n".format(self.__verbose)]
with open(path, "w") as f:
f.writelines(extra_args)
--
1.7.1
More information about the CRIU
mailing list