- 06 Feb, 2016 4 commits
-
-
Andrei Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
crtools binary is linked with the C library and could rely on all the services this library is providing, including system calls. Thus it doesn't need to be linked with the builtin system calls code made for the parasite/restorer binaries. This patch does: - remove the inclusion of syscall.h - replace all call to sys_<syscall>() by C library <syscall>() - replace unwrapped system calls by syscall(SYS_<syscall>,...) - fix the generated compiler's issues. There should not be any functional changes. The only 'code' changes is appearing in locks.h when futex is called through the C library, the errno value is fetched from errno variable instead of the return value. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The CRIU internal define of CLONE_SUBNS should not be put in syscall-types.h since this define is not part of a system call. This move is required to prepare the removal of syscall.h from the component of crtools binary. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The file include/prctl.h should define the struct prctl_mm_map only if it is not already defined in the system include file linux/prctl.h. The definition should be part of the '#ifndef PR_SET_MM_MAP' block since this structure is not defined in that case. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 05 Feb, 2016 4 commits
-
-
Cyrill Gorcunov authored
It is missged in first place and may cause problem on exiting via alarm hanling. Reported-by:
Igor Sukhih <igor@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
All processes should exit if an user presses ctrl-c. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Skip it till remap-links are supported. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 03 Feb, 2016 7 commits
-
-
Kirill Tkhai authored
Test checks that a deleted file content in a deleted parent directory restores right. Initially directory is created in a separate mount, to check the ghost file is created in right mount and link() in rfi_remap() is working. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This patch makes ghost files to restore with the right path. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
Since a deleted file may belong to a deleted directory (which, in turn, may belong to another deleted, etc), it's necessary to recreate all missing dentries in the path. Doing this in mkreg_ghost() is not a good idea, because another ghost file may need some of the dentries in the path, and this requires to do refcouting of recreated directories. To avoid this, we restore a ghost file in the first existing parent directory of the patch. This guarantees, the ghost file will be in the same mount with target file (rfi_remap() needs that, because it uses link()). Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Laurent Dufour authored
The issue here is that ARCH is not overwritten if the caller Makefile already define it, and the upper Makefile is not overwriting the ARCH define to "arm", when it is "armv7l" for instance, so the SRCARCH is set to "armv7l" which is wrong. With this patch, SRCARCH is using the inherinted define if called from the top level Makefile. This is required to build test on armv7l architecture (qemu). Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Sometimes I get: sudo ./zdtm.py run -t zdtm/live/static/cgroup03 umount: /home/tycho/packages/criu/test/zdtm.qPwsoO: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) Traceback (most recent call last): File "./zdtm.py", line 1401, in <module> tst.available() File "./zdtm.py", line 435, in available subprocess.check_call(["flock", "zdtm_mount_cgroups", "./zdtm_mount_cgroups"]) File "/usr/lib/python2.7/subprocess.py", line 540, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['flock', 'zdtm_mount_cgroups', './zdtm_mount_cgroups']' returned non-zero exit status 1 let's use a lazy unmount so we avoid this. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
cgroup.sane_behavior is read only (and in fact, the value is always 0), so we don't need to c/r this value. Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Tikhomirov authored
We have two separate cases 1) mount is external - has mi->external set, 2) mount is internal - mi->external == 0. For those two cases we need separate decesions on making moutn private. In both cases we need private remount if: a)mount does not have master_id and shared_id or b)if mount has different shared_id from bind source. But do not private remount if has master_id or it will be lost. As after setting private the mount is alone in its shared group so setting master will silently fail as kernel can not find any for our mount. (see do_make_slave) https://jira.sw.ru/browse/PSBM-42829 v2: rework patches 2/4 and 4/4 together and no need then in 3/4 Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Acked-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 27 Jan, 2016 18 commits
-
-
Stanislav Kinsburskiy authored
AutoFS will need to create write pipe end file descriptor, if it was closed. Thus, pipe_info structure have to be exported. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Stanislav Kinsburskiy authored
This is a precursor patch for AutoFS mount restore. To restore AutoFS indirect mount points, we have to create mount point dentries. This can do only the process with pgrp, configured to mount. Process, which does AutoFS mount call (init) at that moment is not. Restoring actual pgrp before sid breaks sid restoring. Thus, restoring of sid is required to make process group leader. Signed-off-by:
Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This cleanup makes create_ghost() smaller. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
This cleanup will be used in next patch. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Kirill Tkhai authored
In the most cases, file descriptor is not need in this function. It's need in the case of creating a regular file only. So we can use chown() instead of fchown(), and operate with a path directly. The patch moves copying content of a regular file to new function mkreg_ghost(). This will be used in next patches. Also, parameter gf will be used. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Although we don't want to restore the values on these files, we definitely do want to restore the permissions, as certain container engines (lxc) make use of this. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
These are present in every cgroup, so let's dump them. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
The root mount is always external and master_id is external too. It's required to validate mounts. We already do this on restore, but we need to do this on dump too. Otherwise we will get the error: Mount %d %s (master_id: %d shared_id: %d) has unreachable sharing. Try --enable-external-masters. https://jira.sw.ru/browse/PSBM-43260Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
If for some reason ptrace_poke_area return error we might left dumpee with memfd descriptor opened. Later in code we remove out injected blob making dumpee to look untouched but descriptor will hang there. lsof from container output: | systemd-u 48 root 6u REG 0,4 0 53855 /memfd:CRIUMFD (deleted) Thus lets close it immediately. https://jira.sw.ru/browse/PSBM-43199Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
* Split into two -- full/sb comparisons * Code formatting (spaces) * Arg names Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 21 Jan, 2016 4 commits
-
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
criu detaches from tasks in freezer_detach() in this case Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
We need to detach from all processes before waiting the root task, because one of these processes may collect processes from a target pid namespace. The pid namespace is destroyed only when all processes have been killed and collected. https://jira.sw.ru/browse/PSBM-43089Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 20 Jan, 2016 3 commits
-
-
Kirill Tkhai authored
This fixes the following test error: FAIL: binfmt_misc.c:111: mount failed (errno = 1 (Operation not permitted)) CRIU tests (./test/zdtm.py run -a) passed. Signed-off-by:
Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
There's only one user of it, so better to reshuffle the arg set. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-