- 23 Nov, 2017 40 commits
-
-
Andrei Vagin authored
v2: typo fix v3: run criu pre-dump via rpc v4: don't use status-fd for rpc Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
In this case we can wait it and get an exit code. For example, it will be useful for p.haul where one connection is used several times, so we need a way how to understand that page-server exited unexpectedly. v2: don't write ps_info if a start descriptor isn't set Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
So they can be reused. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Avindra Goolcharan authored
This file is not executable directly, so it should not have the shebang. Signed-off-by:
Avindra Goolcharan <aavindraa@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Begunkov authored
warning: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. if (major(st.st_rdev) != major(st_rtc.st_rdev) || Signed-off-by:
Pavel Begunkov <asml.silence@gmail.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
aio_context_t is 8 byte long so on 32 bit mode it might be strippped off when unsigned long used instead. Fix this typo. Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
v2: defining crit_bin and using it for Popen() // Mike Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
The number of pipes are limited in a system, so it is better to know how many we use. Acked-by:
Mike Rapoport <rppt@linux.vnet.ibm.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
A server socket is created with AF_INET6, but a client socket is create with AF_INET. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
IPv6 listening sockets can accept both ipv4 and ipv6 connections, in both cases a family of an accepted socket will be AF_INET6. But we have to send tcp packets accoding with a connection type. ------------------------ grep Error ------------------------ (00.002320) 53: Debug: Will set rcv_wscale to 7 (00.002325) 53: Debug: Will turn timestamps on (00.002331) 53: Debug: Will set mss clamp to 65495 (00.002338) 53: Debug: Restoring TCP 1 queue data 2 bytes (00.002403) 53: Error (soccr/soccr.c:673): Unable to send a fin packet: libnet_write_raw_ipv6(): -1 bytes written (Network is unreachable) (00.002434) 53: Error (criu/files.c:1191): Unable to open fd=3 id=0x6 (00.002506) Error (criu/cr-restore.c:2171): Restoring FAILED. ------------------------ ERROR OVER ------------------------ Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
The SO_REUSEPORT option allows multiple sockets on the same host to bind to the same port. This option has to ve restored when all sockets are bound to a port. The same logic is already used to restore SO_REUSEADDR. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
SO_REUSEPORT allows multiple sockets on the same host to bind to the same port. Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Regs are present in unsigned format so convert them into signed first to provide results. In particular if memfd_create syscall failed we won't notice -ENOMEM error but rather treat it as unsigned hex value | (05.303002) Putting parasite blob into 0x7f1c6ffe0000->0xfffffff4 | (05.303234) Putting tsock into pid 42773 Signed-off-by:
Cyrill Gorcunov <gorcunov@virtuozzo.com> Reviewed-by:
Dmitry Safonov <dima@arista.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
In CT, we do: mkdir -p /a/b/c1 mkdir -p /c2 mount --bind /c2 /a/b/c1 mount --rbind /a/b /a And after that container is not dumpable with error: mnt: Unable to handle mounts under 146:./a Just because overmounts with shared parent group are prohibited, but I can't see any problem with enabling them. https://jira.sw.ru/browse/PSBM-69501Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Pavel Tikhomirov authored
What we do before patch: 1) If we are NOT in the same shared group - if we have some parent's shared group member unmounted, we just wait for it. 2) If we are in the same group - we wait only for members with root path len shorter than ours. That is done to make child mount propagate in all shared group, but I think it is wrong, e.g.: mkdir -p /dir/a/b/c /d /e /f mount --bind /dir/a /d mount --bind /dir/a/b /e mount --bind /f /e/c Before c/r we have: 507 114 182:1017985 / / rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 144 507 182:1017985 /dir/a /d rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 146 507 182:1017985 /dir/a/b /e rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 148 146 182:1017985 /f /e/c rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 150 507 182:1017985 /f /dir/a/b/c rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 149 144 182:1017985 /f /d/b/c rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 After c/r we have: 600 132 182:1017985 / / rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 602 600 182:1017985 /f /dir/a/b/c rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 603 600 182:1017985 /dir/a /d rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 604 600 182:1017985 /dir/a/b /e rw,relatime shared:63 master:60 - ext4 /dev/ploop63624p1 rw,data=ordered,balloon_ino=12 There is no propagation as all mounts are in same shared group and 602(150) has shorter root than 603(144) and 604(146). What we should do: Wait member of our parent's shared group only if it has our 'sibling' mount in it. Sibling mount is the one which had propagated to shared mount of our parent for us when we were mounted. We need to enforce propagation only for these case. https://jira.sw.ru/browse/PSBM-69501Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
The anonymous shared memory are using shmid for image name encoding which is unsigned long and we already met scenario where high bits get strippped off thus the restore failed. Lets use unsigned long here, and because pagemap code is shared between plain memory and anon shared memory use unsigned long every where. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
The index comes from mnt_id which is signed integer both in kernel and in userspace, but negative value is never valid, thus don't use it. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
For images which are using pid as id for image names use unsigned format since here is no negative pid in real system. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
It uses ns->id Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Since it uses ns->id Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Just as we declare it in ns_id structure. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Same as for autofs. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Same as for autofs. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Both the kernel and criu uses unsigned int for it, make the format appropriate. | struct mount_info { | ... | unsigned int s_dev; | ... | } We didn't see negative number here in real life so I don't think if such %d to %u convention cause backward compatibility problem ever. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
We pass unsigned 4 byte integer here, so use appropriate format. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Namespace descriptors are not promised to have constant short names, so just to be on a safe side. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Cyrill Gorcunov authored
To test if we can survive with shmid more than 4 bytes long in image formats. Without the fix for shmid | [root@uranus criu] test/zdtm.py run -t zdtm/static/maps01 --fault 132 -f h -k always | === Run 1/1 ================ zdtm/static/maps01 | | ========================= Run zdtm/static/maps01 in h ========================== | Start test | Test is SUID | ./maps01 --pidfile=maps01.pid --outfile=maps01.out | Run criu dump | Forcing 132 fault | Run criu restore | Forcing 132 fault | =[log]=> dump/zdtm/static/maps01/36/1/restore.log | ------------------------ grep Error ------------------------ | (00.016464) 37: Opening 0x007f39c04b5000-0x007f3a004b5000 0000000000000000 (101) vma | (00.016465) 37: Search for 0x007f39c04b5000 shmem 0x10118e915 0x7f97f7ae4ae8/36 | (00.016470) 37: Waiting for the 10118e915 shmem to appear | (00.016479) 36: No pagemap-shmem-18409749.img image | (00.016481) 36: Error (criu/shmem.c:559): Can't restore shmem content | (00.016501) 36: Error (criu/mem.c:1208): `- Can't open vma | (00.016552) Error (criu/cr-restore.c:2449): Restoring FAILED. | ------------------------ ERROR OVER ------------------------ And with the fix | [root@uranus criu] test/zdtm.py run -t zdtm/static/maps01 --fault 132 -f h -k always | === Run 1/1 ================ zdtm/static/maps01 | | ========================= Run zdtm/static/maps01 in h ========================== | Start test | Test is SUID | ./maps01 --pidfile=maps01.pid --outfile=maps01.out | Run criu dump | Forcing 132 fault | Run criu restore | Forcing 132 fault | Send the 15 signal to 36 | Wait for zdtm/static/maps01(36) to die for 0.100000 | ========================= Test zdtm/static/maps01 PASS ========================= Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@virtuozzo.com>
-