- 10 Apr, 2015 16 commits
-
-
Pavel Emelyanov authored
It mostly reuses the infrastructure for plugin testing. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The existing set of shell scripts do hard-to-debug things and mess with the root filesystem. We can make it better. First, not to play with the system / the process that will be run in a new mount namespace is statically compiled .c file. And this "init" does a very simple thing -- waits for SIGTERM and check that the given filepath contains the given string. Second, the namespace's root will be some subdir, instead of system / bind-mount-ed into a subdir. This makes it easier to keep things together and makes 100% sure the external bind mount cannot be accessed by custom path. 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>
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
This option enables external (slave) bind mounts to be resolved. v2: don't always assume that when the master id matches, the mounts match Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
With this flag, external shared bind mounts are attempted to be resolved automatically. v2: don't always assume when the sharing matches that the mount matches Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
When this option is specified, if an external (private) bind mount is not specified by --ext-mount-map KEY:VAL then it is attempted to be resolved automatically. v2: introduce find_best_external_match, which looks for the best match based on sharing/slave ids; don't try to resolve fsroot_mounted() mountpoints v3: get rid of really_collect_self_mounts v4: get rid of fsroot_mounted() check when autodetecting external mounts Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Finally add --enable-fs option to specify the comma separated list of filesystem names which should be treated as FSTYPE_AUTO. Note: obviously this option is not safe, use at your own risk. "dump" will always succeed if the mntpoint is auto, but "restore" can fail or do something wrong if mount(src, mountpoint, flags, options) can not actually "just work" as FSTYPE_AUTO logic expects. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Add the new mnt_entry->fsname member and change dump_one_mountpoint() to save pm->fstype->name if fstype == FSTYPE__AUTO. Change collect_mnt_from_image() to pass this ->fsname to decode_fstype() which falls back to __find_fstype_by_name(fsname, true) if FSTYPE__AUTO. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Simple preparation to simplify the review of the next patch. Turn find_fstype_by_name(name) into __find_fstype_by_name(name, force_auto) and reimplement find_fstype_by_name() as a trivial wrapper on top. This allows "restore" to specify that this particular fsname was treated as FSTYPE__AUTO by "dump". Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
The comment in find_fstype_by_name() says: just mounting anything is wrong and this is true in general, but: almost every fs has its own features this is not true in a sense that a lot of supported filesystems do not need any special processing: FSTYPE__PROC, FSTYPE__SYSFS, and more. More importantly, this logic does not allow to spicify from the command line that (say) currently unsupported hugetlbfs can "just work", do_new_mount() should only pass the right name/options. This patch adds the new FSTYPE__AUTO code, find_fstype_by_name(name) adds the new entry if fsname_is_auto(name) returns true. We do not care that different fstype's can have the same FSTYPE__AUTO code, fstype->code has no meaning unless we need to do something special with this fs, but in this case it should not be FSTYPE__AUTO by definition. Note: currently find_fstype_by_name() just returns true, it is obviously pointless to "dump" until we teach "restore" to handle FSTYPE__AUTO. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Preparation. Enlarge fstypes[] to make it possible to add the new fstype's dynamically. This means ths find_fstype_by_name() and decode_fstype() need the additional ->name == NULL check to terminate the search. Also change them to start with "i == 1", we rely on the fact that fstypes[0] is FSTYPE__UNSUPPORTED anyway. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
1. If a fuse connection is present, but there are no fuse mounts of that type in the mount namespace, don't refuse to dump. 2. If there are mounts of that type in the container but they are external, we're going to bind them anyway, so there's no fuse-specific things that need to be done, so it is safe to dump. v2: check that the fstype is fuse as well Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.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>
-
Pavel Tikhomirov authored
we don't need this check as just after it we have: if (ret) break; which safely unpackes nde, and closes nlsk and img in case of error ps: sorry for inconveniences caused by my patchset Signed-off-by:
Pavel Tikhomirov <ptikhomirov@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 09 Apr, 2015 13 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Somehow _sys_ token sneaked into __NR term. Drop it off to be close to kernel's representation. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
check it for default/lo, test values for config options are randomly generated and restricted by rand_limit changes: v2: make for all config options, avoid use of "system". v3: err->fail, run in own set of namespaces, add random, check not all options. v4: use all options because test is run in net-namespace, use ARRAY_SIZE macro v5: check fscanf and snprintf return values properly Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
because namespace default options are set before devices creation, devices will gain default options(except lo, which is created with ns). Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
restore order: 1. default 2. all 3. devices Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
In the rest of this series we need to walk all the namespaces to autodetect which mounts are master/shared/private bind mounts, so we need the information from criu's namespace in the case when the namespaces are not the same. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 07 Apr, 2015 1 commit
-
-
Saied Kazemi authored
Currently if /tmp does not exist, CRIU fails because it will not be able to create a temporary directory there. But when checkpointing and restoring containers, we cannot rely on the existence of /tmp. For such containers, we should use root (/). The temporary directory will be removed after CRIU is done. Signed-off-by:
Saied Kazemi <saied@google.com> Acked-by:
Andrew Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 06 Apr, 2015 4 commits
-
-
Tycho Andersen authored
Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
They both are using 'd' option in different context though, lets give them two names. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Man, it was almost unreadable. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 03 Apr, 2015 3 commits
-
-
Andrey Vagin authored
setns(fd, CLONE_NEWNS) resets cwd and root, so we need to restore them back. Without this patch stats-dump isn't saved in the work dir: -rw-r--r-- 1 root root 32 Apr 2 14:21 /stats-dump Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Which obviously can be used to "ignore" the mounts we do not want or need to dump. The user should know what he does. Note: this patch changes parse_mountinfo() to check should_skip_mount(). This is because imo we want to filter out the unwanted mounts asap, af if they do not exist. This increases the chances the dumping will fail if something else depends on this mount. Say, another mountpoint or an opened file. Perhaps it makes sense to teach should_skip_mount() to use fnmatch() and/or look at the optional "(fs|mnt)=" prefix to skip by fsname too. To me it would be better to force the user of this option to understand what it does. Say, if "dump" fails because the child mount can't find the skipped parent, he should add another --skip-mnt option or do not dump. Otherwise, if we do this automagically the user can probably be surpised, he might even miss the fact that we skip more than he asked. Signed-off-by:
Oleg Nesterov <oleg@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Oleg Nesterov authored
Preparation. 1. Add the new "bool for_dump" arg to collect/parse_mntinfo(). 2. Introduce "struct collect_mntns_arg" to pass the additional "bool for_dump" field to collect_mntinfo() and change it to pass this boolean to collect_mntinfo()->parse_mountinfo() path. 3. Change other callers of collect_mntinfo() to pass "false". Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 02 Apr, 2015 3 commits
-
-
Cyrill Gorcunov authored
They are confusing code readers. Lets save these @subtypes for Unix98 pty peers where they are really important. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We will need it for tty testing. Based-on-patch-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-