- 14 Aug, 2014 10 commits
-
-
Andrey Vagin authored
I didn't find a way how to do that with help "unshare". It's simpler to write this program. It looks better than tricks in zdtm.sh. v2: proxify exit status Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Ruslan Kuprieiev <kupruser@gmail.com> Acked-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If criu process attaches to the root task (it happens for opts.swrk_restore and opts.restore_detach) with ptrace, then any signal delivered to the root would be also delivered to criu. The latter woult treat the former to die due to this delivery and would abort the restore. Fix it by checking that criu (current == NULL) gets ptrace notification (si_code == CLD_TRAPPED) about signal delivered (si_status = SIGCHLD, no other signals are allowed by the restoring tasks). This patch fixes the following error of static/zombie00: Execute zdtm/live/static/zombie00 ./zombie00 --pidfile=zombie00.pid --outfile=zombie00.out Dump 2207 Restore Test: zdtm/live/static/zombie00, Result: FAIL ==================================== ERROR ==================================== Restore log: /root/git/orig/criu/test/dump/static/zombie00/2207/1/restore.log (00.026826) Error (cr-restore.c:1085): 2207 killed by signal 17 (00.026985) Error (cr-restore.c:1706): Restoring FAILED. ================================= ERROR OVER ================================= Reported-by: Mr Jenkins Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Before the patch cg tree section from cgroup00 test looked like this { cnames: "name=zdtmtst" dirs: { path: "/subcg" children: { path: "/subcg/subsubcg" children: <empty> properties: <empty> } properties: <empty> } } this /subsg in the children is excessive. Turn this into directory names. Now the section looks like { cnames: "name=zdtmtst" dirs: { dir_name: "subcg" children: { dir_name: "subsubcg" children: <empty> properties: <empty> } properties: <empty> } } Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Pavel Emelyanov authored
When we omit the --manage-cgroups on dump the controllers section in cgroups image lacks the none-d entries (the name=systemd is the most typical). If it happens, that init task lives in non-criu cgset (it can be so if we do --shell-job dump from another terminal and see criu and root task living in different user.slice systemd cgroups) then on restore the move_in_cgroup() would fail to lookup the required controller. In order to fix this we should still call the collect_cgroups() on dump, so that it adds the none-d controllers into the list, but don't dump the dirs tree itself. The patch looks ugly, but it just moves the current_controller evaluation from the middle of the loop upwards (and renames the char *opts variable not to conflict with global opts). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Tycho Andersen authored
We need to use CLONE_PARENT to prevent processes from immediately dying due to pdeath_sig when they are restored in detached mode. [ xemul: One more place which requires check for restore-detach is in sigactions preparation ] Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to execute tests concurrently, but if auto_msgmni is enabled, the msgmni is recalcalated each time, when ipcns is created or removed. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It isn't required. The kernel has a bug in handling auto_msgmni and if we send extra symbols, a new value isn't applied. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Because setting of auto_msgmni recalculates a value of msgmni Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The kernel has a bug in handling auto_msgmni and if we send extra symbols, a new value isn't applied. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Before: (00.009468) 87: sysctl: <kernel/sem> = <(00.009475) 87: 2108913153 (00.009481) 87: 1252387386 (00.009486) 87: 835139248 (00.009491) 87: 320896030 (00.009496) 87: > After: (00.009468) 87: sysctl: <kernel/sem> = <2108913153 1252387386 835139248 320896030 > Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 13 Aug, 2014 2 commits
-
-
Cyrill Gorcunov authored
Reported-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Sophie Blee-Goldman authored
Fixes a bug in how PARASITE_MAX_GROUPS was calculated, and adds a compiler check to assert that parasite_dump_creds doesn't exceed the page size. Signed-off-by:
Sophie Blee-Goldman <ableegoldman@google.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 12 Aug, 2014 27 commits
-
-
Tycho Andersen authored
When doing a restore for LXC, we store some other metadata (which bridge a veth was on) in the image directory so that the restore script can correctly unlock a network device and attach it to the right interface. This patch is needed so that the script can find this metadata. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Pavel Emelyanov authored
This should be symmetrical with cg dirs creation. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is inspired by two problems we have with cgroup* tests. 1. Tests cannot easily clean after themselves -- one cannot remove a cg dir with tasks in it and the root task of a test is in a cgroup it tries to remove. 2. After dump old cgroup dirs are remained after the test, while criu should restore them (this is what we write tests for). The proposal is to introduce per-test hooks, for now two of them: --pre-restore and --clean. For cgroup tests both hooks will remove the created directories. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
Arrays and "&&" in test are not supported by Busybox v1.19.4. The `set` command can put field-separated arguments into the positional parameters, which is relatively equivalent to using an array. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
If we're dumping namespaced tasks, the fl_owner value we see are the real pids of tasks, while we need virtual ones. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
For that zdtm.sh is executed in pidns to avoid pid conflicts. Cc: Christopher Covington <cov@codeaurora.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Otherwise static/socket-tcp and streaming/socket-tcp have the same path to images and they can affect each other. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
They are now in per-pid images, but every entry contains a pid to which it "belongs". This belonging is fake -- it's just a pid of a task who placed the lock, while locks really belong to files. We even have a bug when task that locked a file exited and "delegated" the lock to its child. This images merge reduces the amount of image files criu generates and may simplify the fix of mentioned above issue. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
A bit later we'd need to check whether cinfo collector opened an image or not due to file absense. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
They all should be zeroed. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If the root task is forked in a new pidns, it can't use its pid for accessing /proc, because this proc belongs to the source pidns. v2: don't copy a static string. v3: take a bright part of Tycho's patch Reported-by:
Tycho Andersen <tycho.andersen@canonical.com> Cc: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Prepare it for multiple tasks by moving cg creation and checking code into helpers. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Fix for closed cgyard descriptor for changed cgroup was 9752c11d. One more place left. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
criu managed cgroups is now an opt-in thing, so by default criu does not manage (i.e. dump or restore) cgroups. This allows users to use the previous behavior. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It looks like criu constantly postpones external bind mounts. I'm trying to resolve when we manage to break this (when I did ext-mount-map they for some reason didn't). Meanwhile, this patch fixes it back. Reported-by:
Saied Kazemi <saied@google.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
The $test variable was being used without being locally defined in the start_test function. Define it locally for uniformity with other functions and use it where convenient. Also make the definition in case_error local for uniformity with other functions. Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Christopher Covington authored
The -p argument to `ps` is not supported by Busybox v1.19.4. Sending signal 0 with the `kill` command is an alternative way to check whether a process is still running. http://www.linuxjournal.com/content/monitoring-processes-kill-0Signed-off-by:
Christopher Covington <cov@codeaurora.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 08 Aug, 2014 1 commit
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-