- 16 Mar, 2016 15 commits
-
-
Andrew Vagin authored
We have two formats for devices and we had to use proper helpers for them and compare values of a one format. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
irmap_revalidate() sets a cursor to the next element or null, then we try to dereference cursor->next in the for statemant. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
.gitid, and some of the build directories from setup.py need to be cleaned on 'clean'. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
From issue #135 Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Cyrill Gorcunov authored
Explicit .PHONY is preferred for style unification sake. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Remember to set tmp2 when allocating the new path so that we can free it later. Also, don't leak tmp2 in the error case. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Evgenii Shatokhin authored
It may happen that a process has completed but its files in /proc/PID/ are still open by another process (see remap_dead_pid test from zdtm suite, for example). If the PID number has been given to some newer thread since then, this can be problematic. If that thread is the main thread of some process, it seems to be handled OK on restore. However, if it is a secondary thread, restore fails with an error like: pie: Error (pie/restorer.c:439): Thread pid mismatch 4404/4403 This is because open_remap_dead_process() adds a helper with PID 4403 to restore /proc/4403/* and that clashes with the thread's PID. It seems reasonable to detect such things at the checkpoint stage and refuse to dump, rather than to fail during restore. v.3: * Loop over dead_pids[] first: the array is likely to be empty. Note that it is still needed to iterate over the threads explicitly because pstree contains no items for the threads at that point. v.2: * Check for conflicts after all tasks have been dumped. One cannot rely on any particular order of tasks being dumped. Signed-off-by:
Evgenii Shatokhin <eshatokhin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
When we bind-mount something into a shared mount, a new mount will be shared too. By default /tmp is a shared mount, so when we get a "clean mount", it will be always shared. On restore we don't need this side effect, so let's do bind-mount in a private mount. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
v2: add a comment before calling BUG_ON(mi->master_id) Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
When a mount is propagated, the result mount is always shared. If we want to get a private mount, we need to convert it. Cc: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
Currently we kdev and odev together and try to compare them without converting to the one type. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
In error cases we need to exit immediatly Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrei Vagin authored
CRIU processes save *.gcda and *.gcno files near source files, so when we restore tests into another mount namespace, we need to have access to sources from this namespace. Cc: Sergey Bronnikov <sergeyb@openvz.org> Reported-by:
Sergey Bronnikov <sergeyb@openvz.org> Signed-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>
-
- 09 Mar, 2016 7 commits
-
-
Cyrill Gorcunov authored
By default it generates archive name same as a tag name, but Pavel requested to match old scheme and strip off "v" prefix. Reported-by:
Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
v2: print test name + flavor info for each test too. v3: pass dry_run via CR_CT_TEST_INFO Output looks like this now: === Run 1/242 ---------------- Skipping zdtm/transition/thread-bomb (manual run only) Skipping zdtm/transition/file_aio (manual run only) ======================= Run zdtm/transition/maps007 in h ======================= ====================== Run zdtm/transition/maps007 in ns ======================= ====================== Run zdtm/transition/maps007 in uns ====================== === Run 4/242 ---------------- Skipping zdtm/transition/epoll (manual run only) ==================== Run zdtm/transition/pipe_shared00 in h ==================== =================== Run zdtm/transition/pipe_shared00 in ns ==================== =================== Run zdtm/transition/pipe_shared00 in uns =================== === Run 6/242 ---------------- ======================== Run zdtm/transition/fork in h ========================= ======================== Run zdtm/transition/fork in ns ======================== ======================= Run zdtm/transition/fork in uns ======================== === Run 7/242 ---------------- Skipping zdtm/transition/ptrace (manual run only) Skipping zdtm/transition/socket_loop00 (manual run only) ======================== Run zdtm/transition/ipc in ns ========================= === Run 10/242 ---------------- Skipping zdtm/transition/netlink00 (manual run only) ===================== Run zdtm/transition/socket-tcp6 in h ===================== === Run 12/242 ---------------- ... 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> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
After the pidfile manipulation is sanitized, we can have a helper for pidfile wrting. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
For the caller there should be only one pidfile -- the one that should be fired with TERM signal on stop. All the other stuff is test's internal business. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Svyatoslav Vlasov authored
Add new action script tmp-files.sh, which allows user to add files that can be lost between checkpoint and restore to the dump. User files are stored in .tar.gz archive. Tar command does all the file paths and attributes related work. Fixes #65 Signed-off-by:
Svyatoslav Vlasov <svloyso@gmail.com> Signed-off-by:
Eugene Batalov <eabatalov89@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 07 Mar, 2016 1 commit
-
-
Pavel Emelyanov authored
So, here it is. We planned not only to re-shuffle the code, but also to provide compel thing to people, but have only managed to do the former. OK, the compel then would go in 2.1 :) But, we also change the dev-n-release model, so from now on we have 2 branches and release stable one every month to show new stuff earlier. Have fun! Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 06 Mar, 2016 2 commits
-
-
Andrew Vagin authored
otherwise this mount will not be propagated into non-existant mounts Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We could do the math on the consuming side (and indeed, I tried), but it seems much cleaner to just not include this in the first place so that all consumers of it don't need to do the same thing. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 04 Mar, 2016 2 commits
-
-
Tycho Andersen authored
As the comment says, we don't need to restore speical cpuset props twice, and indeed it can cause the restore to fail, e.g.: (00.092356) Error (cgroup.c:1240): cg: Failed writing 0-3 to cpuset//lxc/centoss/cpuset.cpus (00.582490) 18: Error (cgroup.c:1009): cg: Can't move 18 into systemd//lxc/centos/system.slice/systemd-journald.service/tasks (-1/-1): No such file or directory (00.582497) 18: Error (cgroup.c:1124): cg: Can't move into systemd//lxc/centos/system.slice/systemd-journald.service/tasks (-1/-1): No such file or directory (00.582567) 43: Error (cgroup.c:1009): cg: Can't move 43 into systemd//lxc/centos/system.slice/console-getty.service/tasks (-1/-1): No such file or directory (00.582573) 43: Error (cgroup.c:1124): cg: Can't move into systemd//lxc/centos/system.slice/console-getty.service/tasks (-1/-1): No such file or directory (00.582886) 1: Error (cr-restore.c:1306): 18 exited, status=1 (00.594670) Error (cr-restore.c:1308): 7906 killed by signal 9 (00.623099) Error (cr-restore.c:2138): Restoring FAILED. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
The errno here is useful information for debugging, we should also print it. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
- 03 Mar, 2016 13 commits
-
-
Tycho Andersen authored
Instead of all the flags and checks in dump_task_cgroup, let's just collect every new non-criu cgset. 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>
-
Pavel Emelyanov authored
The call to unshare(CLONE_NEWCGROUP) is done unconditionally in prepare_cgns(), which is wrong -- some detection of the fact that we have this ns should be there. This detection (as I see it) -- is whether we've found at least one cgroup with cgns prefix. Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
The current code doesn't work becuase ghost files and directories have different formats. ghost directories are created from a root task, but they are cleaned up from the criu process, so reg_file_info is allocated from shared memory and is_dir is added into it. Fixes #120 Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Andrew Vagin authored
I suggest to inject a fault and than try to execute the same command again without a fault to check that it will complete successfully. v2: skip a parasite blob when we are checking vma-s v3: remove a loop for two iterations v4: clean up v5: call fault hooks from one place Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Before we were unshare(CLONE_NEWCGROUP)ing in a child task, which meant that we couldn't c/r this test once we forbid nested cgroup namespaces. Instead, use a new strategy for testing cgroup namespaces: set up the namespace before forking the test task so there is no nesting, and then do a setns back to init's ns to check the cgroup namespace of the test. This doesn't work in the 'ns' flavor because init in the test's pid ns is the test itself. There is a bit of a chicken and egg problem here, though, because if we set it up after test_init(), we can't unshare because that would be a nested cgroup ns. 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
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Because we don't support nested cgroup namespaces, we can just grab the cgns prefixes from the root cgset's prefix list. This means we only have to query one task for its cgroup file, instead of potentially each of them. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
Basically, instead of --cgroup-root replacing the actual root, when a cgns is present, it just replaces the namespace prefix. See patch comments for details. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
We rely on the synchronous-ness of the behavior because we assume that the task is in all the right cgroups when forking its children. If it's not, and the child has the same cgroups as its parent but not all the moves are done, it might end up in /. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-
Tycho Andersen authored
These flags are restored differently, so let's not make extra namespaces where we don't need them. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
-