- 02 Sep, 2014 27 commits
-
-
Pavel Emelyanov authored
These guys may have pids that are not met in pstree. This is not the reason for skipping those, try to resolve flocks anyway. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Criu may re-lock the lock, thus spoiling the pid, so compare the file inode number instead. 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
Return 0 in a success case Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
After patches, that dump locks w/o dfds array, we can even not allocate one when we don't need it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
If we open a file, lock one, fork, then close and open the file in parent again, lock should 'slide' to the child process anyway. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Inherited flock is the one that a task got from its parent. In case parent closes the corresponding fd, the /proc/locks still shows the parent pid, while the lock is owned by child. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Shared here means that a flock is visible from two tasks -- the owner one and its child. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We have a problem with file locks (bug #2512) -- the /proc/locks file shows the ID of lock creator, not the owner. Thus, if the creator died, but holder is still alive, criu fails to dump the lock held by latter task. The proposal is to find who _might_ hold the lock by checking for dev:inode pairs on lock vs file descriptors being dumped. If the creator of the lock is still alive, then he will take the priority. One thing to note about flocks -- these belong to file entries, not to tasks. Thus, when we meet one, we should check whether the flock is really held by task's FD by trying to set yet another one. In case of success -- lock really belongs to fd we dump, in case it doesn't trylock should fail. At the very end -- walk the list of locks and dump them all at once, which is possible by merge of per-task file-locks images into one global one. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Same reason as for previous patch. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Currently we keep the lock type (posix/flock) till the time we dump it, then "decode" it into binary value. I will need the easy-to-check one early, so parse the kind in proc_parse. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We can't dump netlink socket, inotify, fanotify, if they have queued data, so lets add a function to chech this. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Acked-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Check for setproctitle_init, as old versions of libbsd don't have one. Reported-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Acked-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Acked-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Usually /tmp is a mount point. Recently we found a bug in criu, when it restore mount fanotify on "./" instead of "/". The test didn't find it, because they are pointed on the same mount point. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We try to remove mark on the correct mount point and if the mark is restored on a wrong mount point, we will get ENOENT. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Each mountpoint belongs to a mount namespace, so we need to find a root of the mount namespace and open mountpoint ralative to this root. The same logic is used in get_mark_path(). Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
I'm scared, when I see smth like that: rm: cannot remove ‘/var/lib/jenkins/jobs/CRIU/workspace/test/dump/static/cgroup00/31195/1/.criu.cgyard.6qctPl/systemd/tasks’: Operation not permitted v2: do that only in the "test" directory Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's cleaned up accoding with following statements: * files_id can't be zero (look at dump_task_kobj_ids) * item->ids is allocated for all non-dead tasks * a parent can't be dead In addition here is a tiny coding stype fix. Fixes: 475bb1e7 ("rst: Evaluate per-task clone mask early") Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to collect all objects in a list and write them into the eventpoll image. The eventpoll tfd image will be depricated. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to collect all objects in a list and write them into the fanotify image. The fanotify mark image will be depricated. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We are going to collect all objects in a list and write them into the inotify image. The inotify wd image will be depricated. v2: cb() must always free an entry Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 01 Sep, 2014 1 commit
-
-
Pavel Emelyanov authored
It's been a long delay since 1.2, but we did it :) The greatest new acheivement is finally support for Docker and LXC on CRIU side. Some work is still to be don on the other, but here in CRIU everything is ready. Another notable things are AArch64 support and, of course, a lot of bugfixes. Further plan is to make releases be not so rare :) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Aug, 2014 2 commits
-
-
Tycho Andersen authored
This is really just the last bit of c32046c9; if restore_one_task() fails, we need to do the same futex wakeup we do everywhere else in this function. v2: use err instead of err_fini_mnt after mount has been finalized normally Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Acked-by: Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
In container c/r(OVZ) UNIX socket uid and gid restored from connected peer credentials instead of inode once. https://bugzilla.openvz.org/show_bug.cgi?id=2969 changes: v2 - cleanup headers, close socket, use err instead fail, print id's on error. v3 - wrong patch v4 - move to sockets00, correct patch-message v5 - minor cleanup Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Aug, 2014 2 commits
-
-
Tycho Andersen authored
Once the task restore has failed, we can just abort, no need to restore the cg props. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
When in --restore-detached (i.e. root_as_sibling) mode, we ptrace(PTRACE_SEIZE) the root task to receive its SIGCHLD in case one of its child tasks dies. However, we don't receive a SIGCHLD if the root task itself dies, so we must explicitly abort. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 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 6 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>
-