- 11 Jan, 2014 6 commits
-
-
Kir Kolyshkin authored
In case open_image_dir() fails, it prints an error why, so there is no need to print it one more time. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Use true instead of echo >/dev/null -- same effect, less bytes. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
When running 'make clean' from the top dir, the following error happens: make[3]: Leaving directory `/vz/kir/git/criu/test/zdtm/live/static' make[2]: Leaving directory `/vz/kir/git/criu/test/zdtm/live' set -e; for d in lib live; do make -C $d cleanout; done make[2]: Entering directory `/vz/kir/git/criu/test/zdtm/lib' make[2]: *** No rule to make target `cleanout'. Stop. make[2]: Leaving directory `/vz/kir/git/criu/test/zdtm/lib' make[1]: *** [cleanout] Error 2 make[1]: Leaving directory `/vz/kir/git/criu/test/zdtm' make: *** [clean] Error 2 Fix by adding dummy cleanout target to test/zdtm/lib/Makefile Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Forgot these ones Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
...where they are missing. Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kir Kolyshkin authored
Signed-off-by:
Kir Kolyshkin <kir@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 05 Jan, 2014 1 commit
-
-
Pavel Emelyanov authored
The ret is overwritten by core read sub-routine. Need to reset it to -1 to keep failing in case of e.g. last pid sysctl write. Reported-by:
Neal Becker <ndbecker2@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 04 Jan, 2014 2 commits
-
-
Pavel Emelyanov authored
When RPC is being requested to check the kernel, it's enough to check the minimal amount of kernel feature. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We might need to resolve socket paths, which will require mount infos tree collected. Reported-by:
Neal Becker <ndbecker2@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 31 Dec, 2013 2 commits
-
-
Pavel Emelyanov authored
Two major changes so far -- libcriu.so (RPC wrapper) and plugins. Both define some API and we want to check this API is good enough. Thus we tag the -rc1 to let people try it. If things go smooth, we will just go agead and tar the 1.1. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
[root@avagin-fc19-cr ext]# bash run.sh + make make: Nothing to be done for `all'. + criu=../../../criu + finf=finish + outf=run_output + pidfile=pid_wait + tempd=temp_dir + sfile=source_file + tdir=test_dir + dfile=dest_file + mesg=msg-35 + export finf + export outf + export pidfile + export sfile + export dfile + export tempd + export mesg + export tdir + mkdir dump/ mkdir: cannot create directory ‘dump/’: File exists + mkdir test_dir mkdir: cannot create directory ‘test_dir’: File exists + mount --bind / test_dir + mount --make-rprivate test_dir + unshare --mount ./run_ns.sh + set -e + odir=mexold ++ pwd + cur=/root/crtools/test/mounts/ext + mount --make-rprivate / + rm -rf temp_dir finish run_output /mexold + mkdir temp_dir + touch test_dir/dest_file + mount -t tmpfs none temp_dir + echo msg-35 + mount --bind temp_dir/source_file test_dir//root/crtools/test/mounts/ext/test_dir/dest_file mount: mount point test_dir//root/crtools/test/mounts/ext/test_dir/dest_file does not exist + fail 'Can'\''t unshare ns' + echo 'Can'\''t' unshare ns Can't unshare ns + exit 1 Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 Dec, 2013 3 commits
-
-
Andrey Vagin authored
Makefile is locked, because tests can be executed concurrently. v2: return non-zero code Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
make ZDTM_ARGS="-C -i 2" -C test/ zdtm_ns -j 8 make is able to execute tests concurrently. Now we can customize execution of tests Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If a mount is slave and it has a shared group. crtools must convert it in slave and only than crtools can make it shared. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 27 Dec, 2013 6 commits
-
-
Pavel Emelyanov authored
First of all, silly-rename files' names may change, so kludge the fds comparison properly. Other than this, allow for linked-remaps on write_read10 test as it effectively generates such on NFS. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We cannot distinguish ghost files from linked-remap for NFS. Link count is never 0 on such files and any positive value of it doesn't mean, that the file will stay in place after we terminate all tasks we dump -- they can hold multiple unlinked links on the same file and they all will be delayed-unlined. Checkinf file path doesn't work as well -- silly-rename files remain visible by VFS, though they shouldn't :( Fortunatelly, NFS allows creation of additional likns on such files, so we just create linked remap for such files. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
To catch NFS silly-rename file we'll need more than just struct stat there. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We will need to special-care NFS silly-rename files, thus we need to know which FS a file belongs to. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The -F|--fields option specifies which fields (by name, comma separated) should be printed. For nested fields all names in path should be specified. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Dec, 2013 20 commits
-
-
Andrey Vagin authored
Modern tar and rsync can replace zero chunks with holes. So it's valid situation and shouldn't abort the restore. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
One note -- the macvlan's index _does_ change. We should either patch iproute2 or use raw kernel API to preserve it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Well, when we create external link with ip utility we cannot specify its index. Thus we will not be able to move external device to namespace and ask criu to restore link params. However, RTM_SETLINK can happily work with the link name only. And since we do have one in the images, we can omit setting the index in the requrest. TODO: Send patch with index specification to iproute2. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We should call external scripts when namespaces are created, but before we try to fill them with data from images. This is done so e.g. to make it possible to push external net links to netns. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
If we meet a link we cannot dump we call plugin to check whether it's the link, that should be treated as external. Note, that on restore we don't call any plugins, but consider the setup-namespace script to move the respective link into the namespace. Links are not hierarchical and can be moved between namespaces easily, so it's OK to delegate the link creation to the script. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
For now this "dumping" is just a warning. In the next patches there will be call to plugins. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
To make it look symmetrical to over types dumping. And for simpler further patching. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
If the former file had a path long enough to be near PATH_MAX limit, sprintf'ing link_remap.%d here might overrun the limit. Use snprintf instead. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The expression in if () becomes quite complex and deserves a helper with proper explanation of what's going on. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Use the format specifier %zu instead of %lu to print a size_t integer. 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
It's not freed anywhere. Makes code look simpler. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
All the entries with with_plugin set will be mounted by plugin. The interesting case is when we do the pivot-root restore. In this case we call restore callback very early (before we unmount the old tree) and ask it to create the mountpoint at temporary location. Later we move the mount to proper place. The old_root argument of the callback is where it can find files in the original mount namespace. The is_file is return-argument. Sine files and directories cannot be bind-mounted to each-other, the callback should create the mountpoint itself and report whether it created file or directory. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
External bind mounts are those with source sitting outside of the current FS view. Such are detected in validate_mounts(), so we just go ahead and call plugins. The plugin is provided with the mountpoint to decide whether it's his or not (what else does the guy need?) and an ID with this it can identify the mountpoint in /proc. The same ID will be used at restore time to find the needed restore info. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The t and m match there, but strictly speaking we're working on the m. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We'll have to pre-mount some, so move the read_mnt_ns_img before pivot_root call. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-