- 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 22 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>
-
Pavel Emelyanov authored
To carry them with us in a local variable (next patches), not the global mntinfo one. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We will need images at hands while we do pivot_root (see further patches), so prepare the images reading routine. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 23 Dec, 2013 7 commits
-
-
Andrey Vagin authored
CID 1141016 (#1 of 1): Extra sizeof expression (SIZEOF_MISMATCH) suspicious_pointer_arithmetic: Adding "40UL /* sizeof (FilePermsEntry) */" to pointer "(FownEntry *)perms" of type "FownEntry *" is suspicious because adding an integral value to this pointer automatically scales that value by the size, 48 bytes, of the pointed-to type, "FownEntry". Most likely, "sizeof (FilePermsEntry)" is extraneous and should be replaced with 1. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 1141017 (#1-2 of 2): Resource leak (RESOURCE_LEAK) 14. leaked_handle: Handle variable fd going out of scope leaks the handle. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 1141015 (#1 of 1): Resource leak (RESOURCE_LEAK) 8. leaked_handle: Handle variable fd going out of scope leaks the handle. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 1141011 (#1 of 1): Double free (USE_AFTER_FREE) 24. double_free: Calling "free(void *)" frees pointer "ue" which has already been freed. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The timeout can be exceeded during dumping and restoring. When we are testing snapshots, the test is dumped three times. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
In file included from arch/x86/crtools.c:11:0: include/ptrace.h:16:0: error: "PTRACE_LISTEN" redefined [-Werror] #define PTRACE_LISTEN 0x4208 ^ In file included from include/ptrace.h:5:0, from arch/x86/crtools.c:11: /usr/include/sys/ptrace.h:150:0: note: this is the location of the previous definition #define PTRACE_LISTEN PTRACE_LISTEN ^ cc1: all warnings being treated as errors make[1]: *** [arch/x86/crtools.o] Error 1 Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
CID 1141012 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW) 2. fixed_size_dest: You might overrun the 108 byte fixed-size string "addr.sun_path" by copying "service_address" without checking the length. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 Dec, 2013 2 commits
-
-
Pavel Emelyanov authored
Just a small mistake in prev patch. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
It's a feature of PTRACE_SEIZE. So we need to do something, only if we want to change the state. [xemul: If task _was_ in stopped state before dump and we want them to stay alive after dump, the existing code queues one more STOP to it. This affects subsequent dump, as we seize a stopped task with STOP in queue. One more item in TODO list -- support stopped tasks with STOP in queue :) ] Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-