- 19 Oct, 2015 17 commits
-
-
Andrew Vagin authored
OpenVZ creates per-container kernel threads and they live in container's cgroups. CRIU should skip these threads, it's impossiable to get any state of them. Signed-off-by:
Andrew Vagin <avagin@virtuozzo.org> Signed-off-by:
Andrew 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
This patch(set) is inspired by similar from Andrey Vagin sent sime time earlier. The major idea is to artificially fail criu dump or restore at specific places and let zdtm tests check whether failed dump or restore resulted in anything bad. This particular patch introduces the ability to tell criu "fail at X point". Each point is specified with a integer constant and with the next patches there will appear places over the code checking for specific fail code being set and failing. Two points are introduced -- early on dump, right after loading the parasite and right after creation of the root task. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This option cannot be tested using classic zdtm tests as it implies some data created before restore and passed through criu restore down to the restored process (descriptor in our case). So add inhfd_test class that creates such. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
One for checkpoint another for restore. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
We don't check the return value here, so let's return void. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
As of https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=fb7589a1 tun support is merged, so let's check it in ms as well. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
As of https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5442e9fbd this feature is in mainline, so let's check for it in ms. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
As of https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=49d063cb3 the mnt_id field is in mainline, so let's check for it in --ms. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
The /dev/rtc device major value may change depending on the architecture, and kernel release. To ensure the test rtc is working all the time, we no longer belong on hard coded major value but peek it from /dev/rtc itself. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Laurent Dufour authored
Since crtools is no more linked with object build for the parasite/restorer blob, it no more needs the builtin memory services. Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Tree ways are possible -- always, never and only for tests that failed. The latter one is the default. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
This class is essentially libcriu in python(yet for now it has only some basic functions such as check/dump/restore). It is needed to make life for python users even more easier, i.e. hiding some nasty connection stuff. It is also using criu swrk(COMM_BIN) communication method, instead of an old system service, as we no longer recommend it. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
1. As pointed out by Coverity (CID 114629), mnt_ns_fd is closed, but then the function calls try_clean_remaps(mnt_ns_fd) which tries to close the file descriptor which is already closed. To address this, let's use safe_close() which sets closed fd to -1. As it also checks its argument, there's no need for explicit check so let's remove "if" check before close(). 2. As Pavel pointed out, "calling the whole try_clean_remaps() is not required once we've passed the cleanup_mnt_ns() point". This could be addressed by introducing yet another label, but it's cleaner to just use a flag variable. Note that since the second issue is being addressed, the first one goes away, but let's keep the fix for it anyway, it might help in the future. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
When running tests, there are a lot of errors like this: (00.000053) Error (sysctl.c:367): Can't open sysctl net/ipv4/tcp_rmem: No such file or directory As Andrew explained, tests are running in a netns that lacks this sysctl. Use CTL_FLAGS_OPTIONAL flag to hide the error message. Since with this flag sysctl_op() will most probably return 0, add an additional check for vect[0] == 0 to detect that the file was not read and show an appropriate warning, i.e. "TCP mem sysctls are not available. Using defaults." Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
I spent some time trying to figure out why vect array is declared as [2][3], also why vect[0] is not used. The answer is commit 4bca68ba that removed code using it. Let's save a few bytes, and make the code more readable. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 15 Oct, 2015 6 commits
-
-
Ruslan Kuprieiev authored
As our tests serve as an example for people on how to preferably use criu, we need to also switch to swrk. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Not sure if it is okay, but this patch breaks backward compatibility, as we now discourage people from using criu as a system service by default. But it is better to be done rather sooner than later, considering criu service is not widely used. On a patch side, we just need to daemonize swrk if self-dump is requested. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
As we've deleted them in previous two patches. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
We don't need it without systemd configs. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
As it is not recomended to run criu as a root system service, lets remove service file to stop encouraging people to do it. Signed-off-by:
Ruslan Kuprieiev <rkuprieiev@cloudlinux.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>
-
- 14 Oct, 2015 6 commits
-
-
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>
-
Laurent Dufour authored
This patch change the build chain to not use pie objects in the crtools executable. This done by building the shared source files twice: 1. for parasite/restorer as '<file>-pie-build.o' 2. for crtools as '<file>.o' Signed-off-by:
Laurent Dufour <ldufour@linux.vnet.ibm.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The kernel prior 4.3 is exporting FS_EVENT_ON_CHILD bit via procfs fdinfo interface. This bit is kernel's internal and should not be passed in inotify_add_watch call. Thus simply filter it out when obtain from old images for backward compatibility reason. More details here https://lkml.org/lkml/2015/9/21/680Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
open_mountpoint helper is called when mount namespace are already restored so we have to use local paths. This is a continuation to patch a082f27b -- we keep mount point id in fsnotify, thus we should use the namespace's path for open. https://jira.sw.ru/browse/PSBM-39957Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
If criu restore failed, criu should wait all processes because they hold files, namespaces and other stuff that caller might want to have released (in our case it was ploop device). Here we do this only for cases when processes are restored in a pid namespace. We'd like to do the same for non-ns case, but there's no simple way to wait for a bunch of unconnected processes. Another good side effect is that "Restoring FAILED." will be printed at the end of the log (now after we kill init tasks still have time to do smth and write log messages). Cc: Nikita Spiridonov <nspiridonov@odin.com> Reported-by:
Nikita Spiridonov <nspiridonov@odin.com> Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 12 Oct, 2015 11 commits
-
-
Andrew Vagin authored
We need to use SIG_SETMASK instead of SIG_BLOCK. SIG_SETMASK The set of blocked signals is set to the argument set. Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Otherwise it's impossible to understand from which namespace this path should be opened. 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>
-
Andrew Vagin authored
For slave mount we need to make sure that all childrent mountpoints of the master peer is mounted before we can proceed otherwise there gonna be duplicated mountpoints after the restore. https://jira.sw.ru/browse/PSBM-39957Signed-off-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This flag means that there's lib/ directory where a plugin is. Currently rtc test is such. The wait_pid_die timeout is risen since this test dies for more than 6 seconds :) Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Sometimes tests fail before generating .out file, so print its contents only if it exists. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
I constantly have binfmt_misc off on my set ups :) Looks like this fs is far from being default for systems, so to make the test work (we plan to rewrite it anyway) let's make this fs being optional. 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>
-