Increase timeout for fs sync in case of NFS mount in CT #PSBM-138022New kernel is supposedly doing proper disk syncs in CT, thus might
lead to longer sync times. Lets take pre-cautions and increase sync\
timeout to 300 and 10 seconds respectively.
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Merge pull request #40 in OVZ/p.haul from ~PTIKHOMIROV/p.haul:cgroup-fixes-for-vz9 to vz8-beta* commit '387f736a8037d23e5dc7ec033ac154a4678ca8bc':
p_haul_vz: don't mark cgroups mounts external when have cgroupns
p_haul_vz: don't mark cgroups mounts external when have cgroupnsWhen we have cgroupns (vz8 and vz9), mounting "virtualized" (see
is_virtualized_cgroup() in kernel code) is just allowed in container.
So there is no much point in marking cgroups as external, as they are
now fully internal.
More over if we mark them as external we make criu bind-mount them from
host cgroups, which is cross-userns, and mount flags after this become
locked (see lock_mnt_tree() ...
Merge pull request #39 in OVZ/p.haul from ~PVOKHMYANIN/p.haul-detect-passthrough:vz8-beta to vz8-beta* commit 'f728590293c323a8acbe0d5dde124a7119900bad':
Check container for attached network block devices #PSBM-133249
Check container for attached network block devices #PSBM-133249We need to call additional sync for network devices if they are present.
Old code was incorrect, and only worked for devmapper devices, regardless
of the fact whether they were mpath dm devices, or local lvm, or ploop.
New code performs proper thorough check now.
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Merge pull request #38 in OVZ/p.haul from ~PVOKHMYANIN/p.haul-psbm-130915:vz8-beta to vz8-beta* commit '16119e75298952873f46149c7e90defbe2eb40cd':
Check cgget returned data instead of return code #PSBM-130915
Check cgget returned data instead of return code #PSBM-130915Cgget always returns 0, therefore there is no sense in checking
returncode. Instead we'll check if data it read is not empty.
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Merge pull request #37 in OVZ/p.haul from ~PTIKHOMIROV/p.haul:loosen-criu-version-check to vz8-alpha* commit '6fecca7f2ecbc1314fe87fcb28774d3e88f642e4':
Loosen criu version check a bit to exclude minor version
Loosen criu version check a bit to exclude minor versionDefault CRIU version format is:
<major>.<minor>.<sublevel>.<extra>
There 'major' and 'minor' are used to identify mainstream release on
which Virtuozzo criu is based on. We use 'sublevel' as virtuozzo major
version which changes between different updates, and 'extra' as
virtuozzo minor version which changes while we develop one update.
Let's consider migration to a criu which is an older ver...
Merge pull request #36 in OVZ/p.haul from ~PTIKHOMIROV/p.haul:fix-dumping-ve-cgroup-fields to vz8-alpha* commit '02ad2a1d70a45b7515bb1c9d39a21d6b25eeb93c':
Fix dumping ve cgroup fields
Fix dumping ve cgroup fields1) On vz8 we don't have ve.iptables_mask in kernel, remove it from field
list.
2) We don't want stderr of command to get into vz_<field>.img, don't
redirect stderr into stdout, before this patch we can see image with
error inside:
cat /vz/dump/.../vz_iptables_mask.img
variable file read failed No such file or directory
https://jira.sw.ru/browse/PSBM-102629
Signed-off-by: Pavel Tikhomirov <p...
Merge pull request #35 in OVZ/p.haul from ~PTIKHOMIROV/p.haul:vz8-related-phaul-fixes to vz8-alpha* commit '628d4e67d4a1f8de9afcc0b208b38c82d71b09b1':
Remove beancounter as we don't have it in VZ8
Open extra image in byte mode
Open stats-dump image as binary
Remove beancounter as we don't have it in VZ8This fixes:
File "/usr/lib/python3.6/site-packages/phaul/p_haul_vz.py", line 335, in ve_sync
raise Exception("VE filesystems sync failed ({0}):{1}".format(proc.returncode, proc_output))
Exception: VE filesystems sync failed (84):b'cgroup change of group failed\n'
https://jira.sw.ru/browse/PSBM-102629
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Open extra image in byte modeThis fixes:
File "/usr/lib/python3.6/site-packages/phaul/p_haul_vz.py", line 375, in __create_cgget_extra_image
self.__create_extra_image(img, image_name, image_data)
File "/usr/lib/python3.6/site-packages/phaul/p_haul_vz.py", line 393, in __create_extra_image
f.write(image_data)
TypeError: write() argument must be str, not bytes
https://jira.sw.ru/browse/PSBM-102629
Signed-off-by...
Open stats-dump image as binaryThis fixes:
File "/usr/lib/python3.6/site-packages/phaul/criu_api.py", line 141, in criu_get_dstats
stats = criu_get_stats(img, "stats-dump")
File "/usr/lib/python3.6/site-packages/phaul/criu_api.py", line 134, in criu_get_stats
stats_dict = pycriu.images.load(f)
File "/usr/lib/python3.6/site-packages/pycriu/images/images.py", line 577, in load
m, handler = __rhandler(f)
Fi...
Merge pull request #34 in OVZ/p.haul from ~PTIKHOMIROV/p.haul:fix-mem_sk-inheritance to vz8-alpha* commit '973521bc91a83ea7b16e09c198ac57bab31cbede':
Fix memory socket inheritance after switching to python >3.4
Fix memory socket inheritance after switching to python >3.4After switching to new python now almost all new fds are marked as
"cloexec" including created with socket.fromfd(). We need to pass this
mem_sk to criu (via req.ps.fd) so we need to make it inheritable.
Else criu (page-server) would fail on invalid socket for
sending(/receiving) memory with something like this:
Error (criu/page-xfer.c:152): page-xfer: Can't send PSI 5 to server: Bad file des...
Detect nfs and dm early #PSBM-128306Old code was bugged, has_nfs was checked before it was initialized,
similar scenario took place for dm. This patch moves the code around
to detect these conditions as early as it is possible or reasonable.
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Retrieve external disks list from vzmigrate #PSBM-125810We need to provide information about all ploop devices to new criu version
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Merge pull request #30 in OVZ/p.haul from ~PVOKHMYANIN/p.haul-port_to_py3:vz7-u16 to vz8-alpha* commit '49584ad74a34a770483a7d69602f8ec06bcd5bd1':
Port to python3 #PSBM-101165
Merge pull request #29 in OVZ/p.haul from ~PTIKHOMIROV/p.haul:p_haul_vz-provide-ve-in-criu-req to vz7-u16* commit 'c85fa6fc1da0c90fc56935557a32cb44bdfd81f3':
p_haul_vz: specify vz_ve criu option in request
p_haul_vz: specify vz_ve criu option in requestReading parameters from option arguments is a native way for criu. Now
we use VEID environment variable not only in action scripts but also in
criu code which looks ugly.
Though old VEID environment variable is still there and can be used from
action scripts as needed.
We currently does not need VEID on pre-dump, but let's still provide it in
case we will need it in future.
https://jira.sw.r...
Report CRIU errors #PSBM-121201CRIU errors always contain "Error" in the line, allowing us to parse logs reliably.
We will print CRIU errors both to phaul log, and to optional error log provided via argument.
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Merge pull request #27 in OVZ/p.haul from ~PVOKHMYANIN/p.haul-check-k8s-cfg:vz7-u15 to vz7-u15* commit '2185195d6465b1f0bab05e529b746e885f3276ea':
Fill cg_root request options for CRIU #PSBM-107376
Fill cg_root request options for CRIU #PSBM-107376This is a necessary prerequisite to restore non-root cgroups
Signed-off-by: Pavel Vokhmyanin <pvokhmyanin@virtuozzo.com>
Merge pull request #26 in OVZ/p.haul from ~PVOKHMYANIN/p.haul-check-k8s-cfg:vz7-u15 to vz7-u15* commit 'db031fcaf6c81a687fa92a585722ddf788cd6b89':
Prohibit migration from k8s-enabled to k8s-disabled hosts #PSBM-107866
Merge pull request #25 in OVZ/p.haul from ~ALEXANDER.MIKHALITSY.INT/p.haul:vz7-u14 to vz7-u14* commit 'b93a68542012b0c106560dab3084a56f8060ffa6':
Save ve.pid_max to vz_pid_max.img before migration