- 27 Aug, 2014 2 commits
-
-
Filipe Brandenburger authored
A kernel without that option configured does not have /dev/pts/ptmx, so fallback to the previous way of creating it using mknod instead. The previous code was trying to bind mount ptmx on top of a symlink, which does not actually work... Keep only the symlink call and use a relative symlink instead. Adjust the error message of the symlink case to mention symlink() instead of mknod() and also /dev/ptmx instead of /dev/pts. Tested: - zdtm test suite runs on ^ns/static/.* before and after the change. - Same on a kernel with CONFIG_DEVPTS_MULTIPLE_INSTANCES unset. Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Acked-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Saied Kazemi authored
When dumping Docker containers using the AUFS graph driver, we can use the --root option instead of --aufs-root for specifying the container's root. This patch obviates the need for --aufs-root and makes dump CLI more consistent with restore CLI. Signed-off-by:
Saied Kazemi <saied@google.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Aug, 2014 11 commits
-
-
Andrey Vagin authored
rmdir is executed for non-existent directories, so we don't check an exit code of this operation. This patch executs rmdir only for existent directories and check an exit code of rmdir. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
In this job tests are dumped and resumed. The cgroup02 test checks, that it is moved in another set of cgroups, but this is done on restore. Output file: test/zdtm/live/static/cgroup02.out> ------------------------------------------------------------------------------ 14:35:55.127: 85: found cgroup at cgroup02.test/zdtmtst> 14:35:55.127: 85: found cgroup at cgroup02.test/defaultroot> 14:35:55.127: 85: FAIL: cgroup02.c:132: oldroot not rewritten to zdtmtstroot! v2: typo fix Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Filipe Brandenburger authored
Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Filipe Brandenburger authored
Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Filipe Brandenburger authored
Use a single awk script to parse the ldd output. Filter out other cases that are clearly not libraries, such as static builds ("not a dynamic executable") and linux-gate.so. Make the grep for vdso more specific into linux-vdso.so. Tested: - sudo test/zdtm.sh '^ns/.*' Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Filipe Brandenburger authored
Unfortunately, grep -P is not ubiquitous, so use awk with two regexps to simulate the negative forward lookup in the grep -P expression. Using awk doesn't really make it too unreadable, as using boolean operators such as && and || might actually make it more intuitive than the extended regexp. Tested: - sudo make -C test zdtm_ns - sudo make -C test zdtm_nons Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
From avagin@: And here is one more problem. the newroot directory is created for all controllers, but currently test cleans up it only for the zdtmtst controller. We need to find a way to clean up all other conntrollers. Tests are executed on a node, which is rebooted only for updating kernel, so if we will not clean up all other controllers, we can eat all memory. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Tested-by:
Andrew Vagin <avagin@openvz.org>
-
Andrey Vagin authored
When "make test" is executed, CFLAGS is exported from the root Makefile. These flags define _GNU_SOURCE, so we don't need to define it in the souce file. In addition unistd.h isn't included, so a few functions are shown as undeclared. make zdtm_ns make[3]: Entering directory `/root/criu/test' gcc -O2 -Wall -Werror -DCONFIG_X86_64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE zdtm_ct.c -o zdtm_ct zdtm_ct.c:1:0: error: "_GNU_SOURCE" redefined [-Werror] #define _GNU_SOURCE ^ <command-line>:0:0: note: this is the location of the previous definition zdtm_ct.c: In function ‘main’: zdtm_ct.c:21:2: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration] pid = fork(); ^ zdtm_ct.c:23:3: error: implicit declaration of function ‘setsid’ [-Werror=implicit-function-declaration] if (setsid() == -1) { ^ zdtm_ct.c:49:3: error: implicit declaration of function ‘execv’ [-Werror=implicit-function-declaration] execv(argv[1], argv + 1); ^ zdtm_ct.c:62:3: error: implicit declaration of function ‘getpid’ [-Werror=implicit-function-declaration] kill(getpid(), WTERMSIG(status)); ^ cc1: all warnings being treated as errors Signed-off-by:
Andrey Vagin <avagin@openvz.org> Tested-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
fini_cgroup umounts a cgyard directory, which is mounted in prepare_cgroup(). Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Without this patch, we dump somethin like this: { cnames: "hugetlb" dirs: { dir_name: "" children: { dir_name: "ewroot" children: <empty> properties: <empty> } properties: <empty> } } It's obvious, that dir_name should be newroot. The problem is reproduced, if a task leaves in "/" and has a subgroup. This issue was caught by a chance. The cgroup02 test doesn't clean up controllers and leaves the "newroot" there. So when we executed a cgroup test after cgroup02, we could find many directories like "ewroot", "wroot", etc. This patch fixes this issue. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Filipe Brandenburger authored
The return values were getting dangerously close to the range of meaningful values, in particular the next candidate 63 is equal to '?' which is the typical return value in case of error. The return values for long options may be any integer, so bump them up to outside the ascii range, start above 1000. For ease of review this patch, keep the existing range (41-62) and increment each value by 1000. Tested: - Ran "criu --help", works fine. - Manual dump and restore with some of the options, worked fine. - Ran the zdtm test suite, tests passed. Signed-off-by:
Filipe Brandenburger <filbranden@google.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 22 Aug, 2014 8 commits
-
-
Andrey Vagin authored
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> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Pavel Emelyanov authored
This is to make it convenient for service to setup the same thing. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Tycho Andersen <tycho.andersen@canonical.com>
-
Pavel Emelyanov authored
This reverts commit 4778cb30.
-
Tycho Andersen authored
cpuset.cpus and cpuset.mems can't be written to for the first time after they have tasks, so the traditional mechanism of restoring properties after restoring the tasks won't work here. Instead, we copy the parent values of the properties into them, restore the tasks, and then restore via the traditional mechanism the actual values of these properties. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
In particular, cpuset.cpus and cpuset.mems can both be "lists" (strings), as well as hex integers. We don't use the result of this parse, so it is fine to delete it. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 21 Aug, 2014 1 commit
-
-
Saied Kazemi authored
The AUFS support code handles the "bad" information that we get from the kernel in /proc/<pid>/map_files and /proc/<pid>/mountinfo files. For details see comments in sysfs_parse.c. The main motivation for this work was dumping and restoring Docker containers which by default use the AUFS graph driver. For dump, --aufs-root <container_root> should be added to the command line options. For restore, there is no need for AUFS-specific command line options but the container's AUFS filesystem should already be set up before calling criu restore. [ xemul: With AUFS files sometimes, in particular -- in case of a mapping of an executable file (likekely the one created at elf load), in the /proc/pid/map_files/xxx link target we see not the path by which the file is seen in AUFS, but the path by which AUFS accesses this file from one of its "branches". In order to fix the path we get the info about branches from sysfs and when we meet such a file, we cut the branch part of the path. ] Signed-off-by:
Saied Kazemi <saied@google.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 Aug, 2014 2 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Look at this strace output: 107 linkat(45, "", 1017, "./root/git/orig/criu/test/zdtm/live/static/unlink_fstat03.test (deleted)/link_remap.4", AT_EMPTY_PATH) = -1 ENOENT (No such file or director It's obvious, that we didn't cat the file name. Here is an error in calculation of offset for the last symbol. The current version of code sets this offset in strlen(), but it's actually strlen() - 1. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 19 Aug, 2014 16 commits
-
-
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
We've moved signinfos on core entry, thus the bits with siginfo-s themselves cannot sit on stack any longer. Otherwise we would overwritem them with next batch and will feed stack pointer to the caller, thus causing a data and garbage on the stack to be written into image instead of siginfo data. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The se variable is just an array of pointers on these objects. Need to allocate the objects themselves. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
And sanitize its usage a little bit. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
No need in extra variable for that. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It fails on moving tasks into cpuset due to empty masks. Temporary disable the test. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
After this patch, signal-s*.img won't be created. v2: just move them to the end of array Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Every thread has it's own private signals stored at thread_core->signals_p and leader thread has also shared signals stored at tc->signals_s. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
We need it to be able to dump signals into cores before calling parasite_infect_seized(). Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
In order to save backward compatibility, criu will try to open signal*.img, if no signals_* are found. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
We need to open cores for each thread early, because we'll need them to prepare signals later. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Add signal_queue_entry signals_s for shared signals to task_core_entry and signals_p for private signals to thread_core_entry. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The task_entries is a small structure used to coordinate the processes restore stages. Currentl we allocate one page for it and handle one separately. No need in this complexity, actually. The rst_mem engine is already capable to controll this small object. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-