- 10 Jul, 2014 1 commit
-
-
Tycho Andersen authored
During the dump phase, /proc/cgroups is parsed to find co-mounted cgroups. Then, for each task /proc/self/cgroup is parsed for the cgroups that it is a member of, and that cgroup is traversed to find any child cgroups which may also need restoring. Any cgroups not currently mounted will be temporarily mounted and traversed. All of this information is persisted along with the original cg_sets, which indicate which cgroups a task is a member of. On restore, an initial phase creates all the cgroups which were saved. Tasks are then restored into these cgroups via cg_sets as usual. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 08 Jul, 2014 5 commits
-
-
Cyrill Gorcunov authored
If pfn = 0 it means we hit something very strange condition but better to not yield BUG_ON here, better exit with error for future investigation. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Cyrill: we exclude these tests because of braindamaged scheme btrfs uses for subvolume device numbering which we don't yet support in inrmaps. Test: zdtm/live/static/inotify_irmap, Result: FAIL ==================================== ERROR ==================================== Test: zdtm/live/static/inotify_irmap, Namespace: 1 Dump log : /mnt/btrfs/workspace/test/dump/inotify_irmap/16077/1/dump.log --------------------------------- grep Error --------------------------------- (00.024342) Error (irmap.c:80): irmap: Can't stat /var/spool: No such file or directory (00.024365) Error (irmap.c:80): irmap: Can't stat /lib/udev: No such file or directory (00.024378) Error (irmap.c:80): irmap: Can't stat /no-such-path: No such file or directory (00.024383) Error (fsnotify.c:184): fsnotify: Can't dump that handle (00.024397) Error (cr-dump.c:1563): Dump files (pid: 16090) failed with -1 (00.024779) Error (cr-dump.c:1911): Dumping FAILED. ------------------------------------- END ------------------------------------- ================================= ERROR OVER ================================= Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Make pre-dump twice and then dump and restore. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Reported-by:
Robert Reinecke <reinecke@rbg.informatik.tu-darmstadt.de> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
As per current top commit (9c0c23c0) the amount of code in CRIU _without_ the contents of the test/ directory is $ git grep -l . | egrep -v ^test | xargs wc -l ... 49999 This is the only chance for such a great one-liner :) The place in the code is not completely random -- it's one of the few occurrences of two consecutive empty lines in a .c file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Tested-by:
Andrew Vagin <avagin@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Ruslan Kuprieiev <kupruser@gmail.com>
-
- 04 Jul, 2014 15 commits
-
-
Pavel Emelyanov authored
It will be rmdir-ed a bit later. 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
CRIU doesn't support relative unix sockets paths, so tune the test to use absolute. (v2: Off-by-one spotted by Filipe) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Otherwise the connection can be disconnected due to a timeout, because the kernel may drop packets from a receive queue (RcvPruned in /proc/net/netstat). Half of buffers always stay in the socket, another half is circulated. 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>
-
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
When cwd is removed (it can be) we need to collect the respective file_desc before starting opening any files to properly handle ghost refcounts. Otherwise we will miss one refcount from the cwd's on ghost, which in turn will either BUG inside ghost removal, or will fail the cwd due to the respective dir being removed too early. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The prepare one will become more complicated soon. 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
If we have opened and rmdir-ed directory, the dump works OK creating the ghost file and remap, but restore creates _file_ instead of directory. Fix this. 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>
-
- 03 Jul, 2014 5 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>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When we have opened and unlinked chr or blk device, we shouls also take care of their rdev value. Thus -- new field in image and some new steps on dump and restore. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 02 Jul, 2014 10 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
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Some tests require custom options for dump and restore. Instead of hard-coding test names into zdth.sh, introduce the $test.opts file from which zdtm would pick the needed options. 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>
-
- 01 Jul, 2014 4 commits
-
-
Pavel Emelyanov authored
On ARM some PTRACE_... constants are not declared in sys/ptrace.h file. They are in linux/ptrace.h, but on x86 this file somewhat conflicts with the sys/ one. For now fix ARM compilation by using criu/ one and think of it later. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Andrey validly pointed out, that restoring pdeath_sig is not compatible with criu_restore_child() call -- after criu restore children, it will exit and fire the pdeath_sig into restored tree root, potentially killing it. The fix for that could be -- when started in swrk more, criu can restore tree not as children tasks, but as siblings, using the CLONE_PARENT flag when fork()-ing the root task. With this we should also take care about errors handing -- right now criu catches the SIGCHILD from dying children tasks, and since we plan to create them be children of the criu parent (the library caller) we will not be able to catch them. To do so we SEIZE the root task in advance thus causing all SIGCHLD-s go to criu, not to its parent. Having this done we no longer need the SUBREAPER trick in the library call -- tasks get restored right as callers kids :) Some thoughts for future -- using this trick we can finally make "natural" restoration of shell jobs. I.e. -- make criu restore some subtree right under bash, w/o leaving itself as intermediate task and w/o re-parenting the subtree to init after restore. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrey Vagin <avagin@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
-