2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00
Commit Graph

7582 Commits

Author SHA1 Message Date
Pavel Emelyanov
30098d452f mem: Split draning pages from xfer-ing them
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-10-05 13:10:33 +03:00
Pavel Emelyanov
41c3ca8616 dump mem: Replace two bools with ctl struct
This is to make it easier to extend this logic further.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
2016-10-05 12:00:16 +03:00
Kir Kolyshkin
b149048812 Documentation: enable monospaced font in PS/PDF
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
5c6817349d Documentation: prettify the man page
This adds a way to re-enable justification and hyphenation for
the man page (which in enabled by default in troff but then
Docbook explicitly disables it). The man page looks better this way.

The reason why hyphenation for man pages is disabled by Docbook is
"The problem is that groff is not particularly smart about how it
does hyphenation; it can end up hyphenating a lot of things that you
don't want hyphenated".

The reason why justification for man pages is disabled by Docbook is
"justified text looks good only when it is also hyphenated.
Without hyphenation, excessive amounts of space often end up
getting between words, in order to "pad" lines out to align
on the right margin".

I carefully checked the resuling man page using both terminal output
on 80 columns and the PS/PDF generated. In both cases hyphenation
looks normal, i.e. I don't see any unwanted cases of extra hyphenation.
Same for justification.

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
69c79bb500 criu(8): massive man page update
This is an attempt to cleanup the man page. I am very sorry this comes
in this one big patch. Here are the changes:

1. Use *BOLD* for literals, 'ITALIC' for arguments (variable
substituions)

2. Do not use <> for arguments, as they are already marked so (italic)

3. Remove details about "criu exec" and remote syscalls execution;
   add note that it's obsoleted by Compel.

4. Some descriptions are shrunk, some made longer, many are rephrased.

5. Formatting: use second-level lists (*value*:::) where appropriate
   (mostly instead of bulleted lists of values).

6. Properly show comma-separated lists of arguments (with second pair
   of [] and ...

7. Proper use of terms 'option' and 'argument' (*--option* 'argument').

8. Other fixes to formatting and English (such as missing a/the articles).

...

98. Change author to be "the CRIU team".

99. Update copyright years, copyright holder is Parallels Holdings.

[v2: rebase]

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Kir Kolyshkin
4edc7c9cb2 Documentation/Makefile: set nmkdir
I was not able to find a way to make a target in sub-makefile
(such as "cd Documentation && make pdf") without this hack.

If there's a better way, please let me know

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:02 +03:00
Dmitry Safonov
e38c37f05a Travis: check mrproper cleanings
Let there be more make-tests.

Cc: Adrian Reber <adrian@lisas.de>
Cc: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:06:00 +03:00
Stanislav Kinsburskiy
0bda4caa43 zdtm: add test for shared threads FS structure migration
Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:54 +03:00
Stanislav Kinsburskiy
a8969a9542 restorer: add forgotten CLONE_FS flag for threads clone
Threads must share fs struct. Without this path each thread has it's own fs
struct.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:54 +03:00
Pavel Emelyanov
2c623a56b1 mount: Move fstypes related code into separate files
After this the mount.c is no longer the fattest .c in the tree:

  - before
    3947 criu/mount.c
    3179 criu/cr-restore.c
    2622 criu/proc_parse.c
    2095 criu/tty.c

  - after
    3179 criu/cr-restore.c
    3170 criu/mount.c
    2623 criu/proc_parse.c
    2095 criu/tty.c

One "not move" thing is -- since fstype array is static to the
filesystems.c and mount.c needs to access fstype[1] for auto
mounts, the fstype_auto() call is added.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:54 +03:00
Kirill Tkhai
f0ea03bdbf mount: Corrent sibling path when parent and child have the same mountpoint
When m and pa are mounted in the same directory, rpath is initialized
to empty string (rpath[0] points to '\0'). In this case snprintf() at
the bottom of function makes path have '/' at the end.

In further, function validate_shared(), which uses the result, calls
find_shared_peer() and fails to find a peer.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Acked-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:41 +03:00
Pavel Emelyanov
5f30c24964 mount: Do not set key to anything for auto-ext-mounts
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:41 +03:00
Pavel Emelyanov
5af9e2b189 mount: Helper for auto-ext entry creation
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:40 +03:00
Pavel Emelyanov
8ccdb649bb mount: Relax ext mounts resolving
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:40 +03:00
Pavel Emelyanov
fbaa91855d ext: Sweep external resources code into separate files.
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:40 +03:00
Pavel Emelyanov
a8f16a953e help: Introduce separate section for external resources
The plan is to describe them all more carefully.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-27 17:03:40 +03:00
Tycho Andersen
92226c6f3c help: update help output for --cgroup-root
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Tycho Andersen
66c2b67532 doc: document --cgroup-root on dump
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Tycho Andersen
7a1cdd2661 tests: cgroup02 should use --cgroup-root on dump
To mimic the environment that systemd is in when it causes the problem, we
preserve a prefix cgroup path across checkpoint and restore which the tasks
live below, and then we open a fd to this path. Without
--cgroup-root /prefix on dump, this test fails:

(00.030429)     32: Error (criu/files-reg.c:1487): File home/ubuntu/criu/test/zdtm/static/cgroup02.test/zdtmtst/prefix has bad mode 040600 (expect 040777)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Pavel Tikhomirov
1ede31b77e zdtm/cgroup02: fix test using ropts instead of opts
In commit 07d259f365f2 ("cgroup: support --cgroup-root on dump too")
criu starts to understand --cgroup-root option on dump, but our
cgroup02 test in cgroup02.desc file sets these opt to /newroot
unintentionaly, as on dump we don't have /newroot dump fails:

https://ci.openvz.org/job/CRIU/job/CRIU-x86_64/branch/criu-dev/989

======================== Run zdtm/static/cgroup02 in h
=========================
Start test
Test is SUID
./cgroup02 --pidfile=cgroup02.pid --outfile=cgroup02.out
--dirname=cgroup02.test
Run criu dump
=[log]=> dump/zdtm/static/cgroup02/30/1/dump.log
------------------------ grep Error ------------------------
(00.023103) Error (criu/cgroup.c:620): cg: failed walking
/proc/self/fd/10/newroot for empty cgroups: No such file or directory
(00.023129) Error (criu/cr-dump.c:1359): Dump core (pid: 30) failed with
-1
(00.023944) Error (criu/cr-dump.c:1675): Dumping FAILED.
------------------------ ERROR OVER ------------------------

So fix this by using restore-only ropts instead of opts.

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Andrei Vagin
64bf0160a8 mnt: pass a mount point patch to get_mp_mountpoint
It will be used in next patches

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Markus Knetschke
aca9b70156 change the return value of get_fs_type from int to long.
The field fs_type field of fd_parms is already long
Additionally the glibc man page says "Using unsigned int for such variables suffices on most systems." referring the minimum width of variables holding fs_type
There are already fs_types who sets the highest bit (CIFS, BTRFS HPFS...) which interfere with the error check in dump_one_reg_file_cond (fs_type < 0) through the cast into signed int and after this into long

Fixes error while dumping programs on a btrfs partition

Signed-off-by: Markus Knetschke <markus.knetschke@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:44 +03:00
Tycho Andersen
e8796f4496 lsm: remove SELINUX undef
I suspect this snuck in when I was build testing code. Anyway, it shouldn't
be here :)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Andrei Vagin
3a61c38a58 restore: block sigchld to remap task_entries
Currently we remap task_entries but it can be used from a sigchld hanler.
We need to block sigchld to remap task_entries and unlock it
when a restorer sigchld handler is set.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Andrei Vagin
357c78f8f7 asm: move ksigfillset to non-arch header
ksigfillset is the same for all architectures and
here is no reasons to duplicate the same code many times.

In addition, this patch addes ksigemptyset and ksigaddset.
They will be used in the next patch.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Tycho Andersen
241163f28c cgroup: only reset directory when dirnew is valid
In the case where we don't rewrite anything, dirnew is never set, so we
shouldn't reset anything, because we didn't do any work.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Kir Kolyshkin
40edd7eff5 lib/c/criu.h: rm explicit numbering of enum elements
C standard specifies that the first enum element is 0 and the next ones
are +1 to a previous element (C90, "3.5.2.2 Enumeration
specifiers").
Therefore, there is no need to explicitly specify element values.

The explicit initializers were added in the first commit introducing
this enum (commit 46e8aee).

While at it, let's also add a comma after the last element, for any
future patch adding more elements to look better.

No functional change.

Cc: Ruslan Kuprieiev <rkuprieiev@cloudlinux.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Ruslan Kuprieiev <rkuprieiev@cloudlinux.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Tycho Andersen
cb19e69e62 cgroup: support --cgroup-root on dump too
The problem here is again caused by systemd :). Every process lives in some
child cgroup and not the root one, so we end up with a bunch of stuff like:

/init.scope
/system.slice/...
/user.slice/...

and nothing in the root cgroup. However, systemd opens
/sys/fs/cgroup/systemd, changes the perms, and keeps a fd around.
Unfortuantely, we don't track the perms on the "real root" cgroup here,
because nothing is at that level, so when we restore, our cgroup perms
changing code doesn't catch this perms change, and we get:

(00.361723)      1: Error (criu/files-reg.c:1487): File sys/fs/cgroup/systemd has bad mode 040755 (expect 040775)

To fix this, let's just support the --cgroup-root argument on dump too, and
rewrite the cgroup paths we dump accordingly.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Tuan T. Pham
d2647d3350 Add script to install required packages to compile in Debian
From 5f6b24723b Mon Sep 17 00:00:00 2001
From: "Tuan T. Pham" <tuan@vt.edu>
Date: Thu, 8 Sep 2016 03:42:12 -0400
Subject: [PATCH] Add script to install required packages to compile in Debian

In order to setup an environment to compile and to test CRIU
from source, we need to have required packages in Debian
environment.[^0] This script and its package list will help
setting it up.

contrib/debian/dev-packages.lst:
* List of required packages for Debian development environment

scripts/install-debian-pkgs.sh:
* A simple bash script instaling the required Debian packages

[0]: https://criu.org/Installation

Signed-off-by: Tuan T. Pham <tuan@vt.edu>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Cyrill Gorcunov
f43508d29a mount: cgroup -- Fix nil dereference
In case if there is no CLONE_NEWCGROUP on root
namespace mask the @private member remains nil
and comparision in mounts_sb_equal leads to nil
dereference.

CC: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:43 +03:00
Tycho Andersen
61227252a9 tests: add a test for memory/devices "specialness"
v2: add cgroup04.hook which removes the cgroups in between, so things are
    actually restored :)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Tycho Andersen
d52a352258 cgroup: treat devices as "special" properties
v2: don't try to write "" to devices.allow, just skip it since we write 'a'
    to devices.deny everywhere anyway.
v3: leave cgroup prop name as "devices.list" so it is caught in the later
    tests for special-ness. also, don't write the last devices entry twice.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
CC: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Adrian Reber
37051be560 Fix typos in criu/crtools.c
Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Kir Kolyshkin
71485d805a action-scripts.h: rm explicit numbering of enum
C standard specifies that the first enum element is 0 and the next ones
are +1 to a previous element (C90, "3.5.2.2 Enumeration specifiers").
Therefore, there is no need to explicitly specify element values.

The explicit initializers were added in commit 5676383 (scripts:
Add ACT_MAX limit and make @action_names being const) but I do not
see the need for them in there either.

No functional change.

Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Tycho Andersen
fe2073ee2e cgroup: fix potential null dereference
new_controller() returns NULL on error, so let's check for that.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Eugene Batalov
44c4ef842d test: fix bug with huge PAGE_SIZE in transition/maps008
Before this patch vma sizes were hardcoded and weren't derived
from PAGE_SIZE value.
But all the actions with these vmas are based on PAGE_SIZE value.
That's why maps008 on PowerPC with "huge" PAGE_SIZE of 64k was simply
terminating due to invalid memory access.

This commit sets vma sizes to safe values derived from PAGE_SIZE.
New sizes are enough to perform all the actions test does with vmas.

Tested-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Kirill Tkhai
a5875ece59 mount: Prohibit second binfmt_misc superblock
This is need to catch the moment when binfmt_misc in mainline kernel is virtualized

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Kirill Tkhai
6e83f54314 mount: Restore binfmt_misc content in case of missing mount
In case of mount image is not containing binfmt_misc mountpoint,
add temporary mountpoint to mount tree and try to restore
binfmt_misc content in ordinary way. Then, umount temporary mountpoint.

v4: New
v5: Check for opts.has_binfmt_misc to determine if image presents
v6: Check for binfmt_misc_list to determine if binfmt_misc entries present

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:42 +03:00
Kirill Tkhai
f5876445d2 mount: Forced mount unmounted binfmt_misc to do not lost its content
Umount does not remove binfmt_misc content. If it's mounted once again,
the same entries remain registered.

Criu does not dump content of umounted binfmt_misc. So, after C/R we
lose it at all.

This patch forces mounting of unmounted binfmt_misc after we collected
mountpoints. If it's unmounted, we mount it back and add this mount
to the tree of collected mounted mountpoints. Further, binfmt_misc
content is dumped in usual way with the only difference, that mount
point itself is not dumped.

v2: Print error in case of umount() fail.
    Move add_forced_mount() to another patch.
v3: Close binfmt_misc dir before its umount().
v4: Do not dump forced mounted mountpoint.
v5: Do not search for binfmt_misc mounted: use opts.has_binfmt_misc.
    Do not count number of entries in binfmt_misc directory.
v6: Add CRTIME_MNT_ID.
    Make mount function generic.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Kirill Tkhai
fbeb3acc94 mount: Autodetect binfmt_misc
Set opts bit if binfmt_misc is mounted on root mnt_ns

v5: New
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Kirill Tkhai
ee15a000ff mount: Create binfmt_misc image w/o device suffix
Use name binfmt_misc.img for any mounted binfmt_misc.
Note, that newly created binfmt_misc images won't restore
on old criu.

Iterate over binfmt_misc_list if it's not empty on restore.

Also, because of above, let's change a behaviour of dump and now
we do not create binfmt_misc images if there is no registered
binfmt_misc entries.

v5: New
v6: Use {open,close}_image sequence to determ if image exists
    Iterate over binfmt_misc_list

Suggested-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Kirill Tkhai
cf164e16e8 mount: Move binfmt_misc entry restore code to subfunction
Also rename restore_binfmt_misc_entry() to write_binfmt_misc_entry()

v6: New
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Kirill Tkhai
725e2d00b8 mount: Collect new type binfmt_misc.img image entries
v6: New
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Kirill Tkhai
6eaedfaa76 image: Rename binfmt_misc image format as "old"
Also add new format without suffix in file name

v6: New
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Cyrill Gorcunov
3acefff9cc tty: Make sure deprecated logic does not take wrong branch
Don't do additional processing for ext-tty which are
expected to not have regfile in image.

Reported-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Cyrill Gorcunov
46c24c00bb tty: Fix deprecation detection logic
When collecting tty records the @id may come in
as external tty entry which has no regular file
record (because it gonna be inherited on the
restore from the command line option).

Thus, make sure that deprecated_ok() is never
called on external ttys.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Pavel Tikhomirov
0daef3d12f kerndat: redirect iptables output to /dev/null
fix for commit 68a938ea84 ("net/iptables: check iptables command has
wait option")

else each criu log contains iptables output:

(00.020184) Found task size of 7ffffffff000
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
(00.029481) irmap: Searching irmap cache in work dir

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:41 +03:00
Andrei Vagin
2dc2d8c56f zdtm: add a program to umount a test root
This program doesn't parse /etc/fstab or /etc/mtab,
it just calls the umount2 syscall.

It is another attempt to fix the error:
subprocess.CalledProcessError: Command '['mount', '--make-private', '/tmp/criu-root-C7MZS9']' returned non-zero exit status 1
OSError: [Errno 16] Device or resource busy: '/tmp/criu-root-C7MZS9'

Signed-off-by: Andrei Vagin <avagin@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:40 +03:00
Andrew Vagin
3b366c3141 zdtm: check "criu dedup"
Add a new option to zdtm.py to run "criu dedup" after "criu dump"
or "criu pre-dump".

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-26 15:42:40 +03:00
Pavel Emelyanov
cd5674ea8f tty: Deprecate no-regfile entry case
TTY files carry link on regfile entry since 1.4 (commit caa64d97)

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
2016-09-26 15:42:40 +03:00