- 09 Feb, 2015 4 commits
-
-
Saied Kazemi authored
Starting with version 3.15, the kernel provides a mnt_id field in /proc/<pid>/fdinfo/<fd>. However, the value provided by the kernel for AUFS file descriptors obtained by opening a file in /proc/<pid>/map_files is incorrect. Below is an example for a Docker container running Nginx. The mntid program below mimics CRIU by opening a file in /proc/1/map_files and using the descriptor to obtain its mnt_id. As shown below, mnt_id is set to 22 by the kernel but it does not exist in the mount namespace of the container. Therefore, CRIU fails with the error: "Unable to look up the 22 mount" In the global namespace, 22 is the root of AUFS (/var/lib/docker/aufs). This patch sets the mnt_id of these AUFS descriptors to -1, mimicing pre-3.15 kernel behavior. $ docker ps CONTAINER ID IMAGE ... 3850a63ee857 nginx-streaming:latest ... $ docker exec -it 38 bash -i root@3850a63ee857:/# ps -e PID TTY TIME CMD 1 ? 00:00:00 nginx 7 ? 00:00:00 nginx 31 ? 00:00:00 bash 46 ? 00:00:00 ps root@3850a63ee857:/# ./mntid 1 open("/proc/1/map_files/400000-4b8000") = 3 cat /proc/49/fdinfo/3 pos: 0 flags: 0100000 mnt_id: 22 root@3850a63ee857:/# awk '{print $1 " " $2}' /proc/1/mountinfo 87 58 103 87 104 87 105 104 106 104 107 104 108 87 109 87 110 87 111 87 root@3850a63ee857:/# exit $ grep 22 /proc/self/mountinfo 22 21 8:1 /var/lib/docker/aufs /var/lib/docker/aufs ... 44 22 0:35 / /var/lib/docker/aufs/mnt/<ID> ... $ Signed-off-by:
Saied Kazemi <saied@google.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If a process is executed in another pidns, a /proc/PID doesn't link with the proper process. This patch fixes a problem like this: 1: Error (util.c:106): Unable to close fd 33: Bad file descriptor Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Jan, 2015 4 commits
-
-
Pavel Emelyanov authored
There are two places where we store IP addresses (both IPv4 and IPv6). Mark them with custom option and print them in compressed form for --pretty output. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Ruslan Kuprieiev <kupruser@gmail.com>
-
Pavel Emelyanov authored
I plan to mark some fields as IP address and print them respectively. The --format hex is not nice switch for this and introducing one more (--format hex ipadd) is too bad. So let's fix the cirt API to be simple and stupid. By default crit generates canonical one-line JSON. With --pretty option it splits the output into lines, adds indentation and prints hex as hex and IP as IP. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Ruslan Kuprieiev <kupruser@gmail.com>
-
Pavel Emelyanov authored
Can be useful to re-run some tests in case smth failed in the middle Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Jan, 2015 1 commit
-
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 27 Jan, 2015 11 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Manage to forgot to increase pointer by length of the words parsed. Reported-by:
Mark O'Neill <mao@tumblingdice.co.uk> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> 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>
-
Ruslan Kuprieiev authored
It is nice to have non-root user case covered with tests. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Use mature technics to organize test process. Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
v2: fix mm.proto too Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We suppose that the test is not able to exit before this moment. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Jan, 2015 2 commits
-
-
Konstantin Khorenko authored
Need to make it working in Debian where "dash" is default. Signed-off-by:
Konstantin Khorenko <khorenko@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 23 Jan, 2015 9 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
zdtm_ct.c:19:14: error: ‘CLONE_NEWNS’ undeclared (first use in this function) if (unshare(CLONE_NEWNS | CLONE_NEWPID | CLONE_NEWNET | CLONE_NEWIPC)) Reported-by: Mr Jenkins Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
sockets.c: In function ‘preload_socket_modules’: sockets.c:153:36: error: ‘NETLINK_SOCK_DIAG’ undeclared (first use in this function) sockets.c:153:36: note: each undeclared identifier is reported only once for each function it appears in Reported-by: Mr Travis Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 22 Jan, 2015 9 commits
-
-
Andrey Vagin authored
inlcude util.h Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Ruslan Kuprieiev authored
Signed-off-by:
Ruslan Kuprieiev <kupruser@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
For example: $ criu show stats-dump Error (crtools.c:468): Unable to handle more than one command $ ./criu show -f stats-dump dump: { freezing_time: 626 frozen_time: 24762 memdump_time: 2696 memwrite_time: 1007 pages_scanned: 1108 pages_skipped_parent: 0 pages_written: 28 irmap_resolve: 0 } Reported-by:
Thouraya TH <thouraya87@gmail.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If shm->delta = MAX_DELTA and we set shm->stop to 1, the child can exit before the parent adds MAX_DELTA to shm->delta. parent child shm->stop = 1 if (shm->stop == 1 && shm->delta == MAX_DELTA) break shm->delta += MAX_DELTA Cc: Konstantin Neumoin <kneumoin@parallels.com> Reported-by:
Konstantin Neumoin <kneumoin@parallels.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This is the continuation -- check relevant userns features in criu check. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Right now we state that CRIU works on 3.11 and above kernels and, at the same time, have support for a couple of new features like aio, tun, timerfd etc. available in later kernels. Since these new features do not break generic operations we do not require them in the kernel strictly. However, in the zdtm tests it's very important to know exactly what can and what cannot be tested. Right now this is done in a tough manner -- if the kernel is not 3.11 or criu check fails for _any_ reason we treat the kernel as being "bad" and throw out a set of tests. I propose to test some individual features and form the list of tests in a more fine-grained manner. This patch only fixes the AIO, mnt_id, tun and posix-timers tests. Next I will add checks and fixes for user-namespaces tests. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com>
-