- 12 Nov, 2015 2 commits
-
-
Tycho Andersen authored
v2: * add a zdtm.py .desc file * only look to make sure inet addresses match (in particular, don't match the state) Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Implementing c/r of bridges with slaves shouldn't be too hard (viz. the comment), but this is all I need to for right now. v2: remove extra debug statement v3: * remember to close fd in dump_bridge * use "known" buffer length and snprintf for spath in dump_bridge * change brace style Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 11 Nov, 2015 6 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
We'll use this when restoring eBPF programs in FILTER mode. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
In order to restore seccomp filters, we need to have access to dynamically allocated memory from the restorer blob, so we should unmap this memory afterwards. In order to do this, we need to suspend seccomp earlier, right after we attach to the tasks instead of just before we do the unmap of the restorer blob itself. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
This isn't really an, so let's call it a warning. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
We want to execute tests in an isolated environment 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>
-
- 10 Nov, 2015 13 commits
-
-
Pavel Emelyanov authored
This reverts commit 73cb87f9. Two reasons: individual VMA-s may require different open flags and ghost and link-remap files should be properly unlinked at the end of open_path(). Need some more intelligent solution to this.
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Commit a3a10c44 made all map_files opens happen with O_PATH for speed. However some files (sockets and aio rings) are not detected by this, since kernel's ->open callback is not called and we don't get the ENXIO code. Fix this by opening non-regular files with O_RDONLY. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When live migrating a container with large amount of processes inside the time to do page-server-ed dump may be up to 10 times slower than for the local dump. The delay is always introduced in the open_page_server_xfer() when criu negotiates the has_parent bit on the 2nd task. This likely happens because of the Nagel algo taking place -- after the write() of the OPEN2 command happened kernel delays this command sending waiting for more data. v2: Fix this by turning on CORK option on memory transfer sockets on send side, and NODELAY one once on urgent data. Receive side is always NODELAY-ed. According to Alexey Kuznetsov this is the best mode ever for such type of transfers. v3: Push packets in pre-dump's check_parent_server_xfer too. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrew Vagin <avagin@odin.com>
-
Pavel Emelyanov authored
On restore we do a sequence of open+mmap+close steps. On real apps there exists chains of private file mappings for the same file with different pgoffs and/or flags/prots. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
These three are like map_files one. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
This descriptor is stat()-ed and used to dump file information. In both cases even read access is not required. Even if we decide to go dump ghost file out of it we'll re-open one with O_RDONLY. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Pavel Emelyanov authored
These descriptors are purely used for openat()-s, so having them opened with O_PATH is OK and saves a little bit operations in the kernel space. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org>
-
Adrian Reber authored
Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Currently numbers for /dev/net/tun and /dev/rtc are hardcoded and they changed after the last kernel update. Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Now we save report in test/dump/report. It doesn't work when we mount tmpfs into test/dump, because Jenkins runs in another mount namespace. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Artem Kuzmitskiy authored
Task size depends from VM_SPLIT_* kernel option and cannot be hard coded. This patch based on c0c0546c from Christopher Covington. Signed-off-by:
Artem Kuzmitskiy <artem.kuzmitskiy@lge.com> Reviewed-by:
Christopher Covington <cov@codeaurora.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 09 Nov, 2015 5 commits
-
-
Andrew Vagin authored
Otherwise a test can create or delete some mappings: 8306 getppid() = 83 8306 kill(83, SIGTERM) = 0 8306 clock_gettime(CLOCK_BOOTTIME, {1916694, 423447417}) = 0 8306 clock_gettime(CLOCK_MONOTONIC_COARSE, {1916694, 419509587}) = 0 8306 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3 8306 fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0 8306 fstat(3, {st_mode=S_IFREG|0644, st_size=127, ...}) = 0 8306 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...> 8306 <... mmap resumed> ) = 0x3fffa8570000 8306 read(3, "TZif2...", 4096) = 127 8306 lseek(3, -71, SEEK_CUR) = 56 8306 read(3, "TZif2...", 4096) = 71 8306 close(3 <unfinished ...> 8306 <... close resumed> ) = 0 8306 munmap(0x3fffa8570000, 4096 <unfinished ...> 8306 <... munmap resumed> ) = 0 8306 write(2, "12:15:36.347: 84: ( start) boottime 1916694 boottime-coarse 1916694 total_sleep_time 0\n", 90 ) = 90 8306 futex(0x10020850, FUTEX_WAIT, 0, NULL <unfinished ...> Reported-by: Mr Jenkins Signed-off-by:
Andrew Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Looks like this is new as of the 4.2 timeframe. It does bring up a question: should we do a ls /proc/sys/net/conf/lo on the host to figure out what sysctls to try and dump instead of use this hardcoded list? I guess we need to check file modes too, because of mc_forwarding, but something like that. v2: add ignore_routes_with_linkdown to the end of the hardcoded devconfs list, so as not to break migration across criu versions. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
These are going to be bind mounted from the outside world after all, so there is no use in dumping them. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
Otherwise, you just see an anonymous failure in the logs, like: (00.244773) mnt: Dumping mountpoints (00.244781) mnt: 253: 42:/ @ ./dev/.lxc (00.244793) mnt: Path `/dev/.lxc' resolved to `./dev/.lxc' mountpoint (00.249039) mnt: 133: 41:/ @ ./dev/hugepages (00.249052) mnt: 116: 40:/ @ ./run/lock (00.249064) mnt: Path `/run/lock' resolved to `./run/lock' mountpoint (00.251948) mnt: 115: 3f:/ @ ./run (00.251970) mnt: Something is mounted on top of ./run (00.264803) mnt: Path `/run' resolved to `./run' mountpoint tar: ./uuidd/request: socket ignored tar: ./dbus/system_bus_socket: socket ignored tar: ./acpid.socket: socket ignored tar: ./systemd/journal/syslog: socket ignored tar: ./systemd/journal/dev-log: socket ignored tar: ./systemd/journal/socket: socket ignored tar: ./systemd/journal/stdout: socket ignored tar: ./systemd/private: socket ignored tar: ./systemd/notify: socket ignored (00.368950) mnt: 113: 3e:/ @ ./dev/shm (00.368978) mnt: Path `/dev/shm' resolved to `./dev/shm' mountpoint (00.371551) mnt: 112: 3d:/ @ ./dev/pts (00.371566) mnt: 249: 28:/ @ ./var/lib/lxcfs (00.371749) Unlock network (00.371762) Running network-unlock scripts (00.371766) Unfreezing tasks into 1 (00.371770) Unseizing 13683 into 1 (00.371784) Unseizing 14839 into 1 (00.371794) Unseizing 15678 into 1 (00.371800) Unseizing 16126 into 1 (00.371805) Unseizing 16177 into 1 (00.371814) Unseizing 16301 into 1 (00.371843) Unseizing 16323 into 1 (00.371854) Unseizing 16414 into 1 (00.371900) Unseizing 16595 into 1 (00.371911) Unseizing 16695 into 1 (00.371942) Unseizing 16744 into 1 (00.371964) Unseizing 16904 into 1 (00.372103) Unseizing 16944 into 1 (00.372140) Unseizing 17558 into 1 (00.372196) Error (cr-dump.c:1631): Dumping FAILED. ...which is hard to debug. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Adrian Reber authored
The change to fill out cr_errno if cpuinfo dump/check failed in the previous patch 7e862bb3 was returning (-ENOTSUP & 0xff). To easier check for the return result this is now changed to just return ENOTSUP. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 05 Nov, 2015 14 commits
-
-
Tycho Andersen authored
It seems with the new zdtm.py that pids collide a lot more (perhaps because everything is in its own pid namespace? not sure). In any case, this is annoying as it prevents a second run of the tests from actually getting to the test part. So, let's try to move the old directory out of the way. 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
Most python uses spaces, so that's probably what people have their editors configured to do. Since this file uses tabs, let's be explicit about it. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
This avoids problems like: $ sudo ./zdtm.py run -a Skipping test zdtm/live/static/mem-touch (manual run only) ./sock_opts00 --pidfile=sock_opts00.pid --outfile=sock_opts00.out ./sock_opts00 --pidfile=sock_opts00.pid --outfile=sock_opts00.out ==================== Run zdtm/live/static/sock_opts00 in h ===================== Start test Test is SUID Run CRIU: [dump -o dump.log -D dump/zdtm/live/static/sock_opts00/74/1 -v4 -t 74 --pidfile /home/ubuntu/criu/test/zdtm/live/static/sock_opts00.pid] Run CRIU: [restore -o restore.log -D dump/zdtm/live/static/sock_opts00/74/1 -v4 --pidfile /home/ubuntu/criu/test/zdtm/live/static/sock_opts00.pid --restore-detached] Wait for zdtm/live/static/sock_opts00 to die for 0.100000 Remvoing dump/zdtm/live/static/sock_opts00/74 ==================== Test zdtm/live/static/sock_opts00 PASS ==================== ==================== Run zdtm/live/static/sock_opts00 in ns ==================== Construct root for zdtm/live/static/sock_opts00 Start test Test is SUID Traceback (most recent call last): File "zdtm.py", line 850, in <module> do_run_test(tinfo[0], tinfo[1], tinfo[2], tinfo[3]) File "zdtm.py", line 641, in do_run_test cr(cr_api, t, opts) File "zdtm.py", line 562, in cr cr_api.set_test(test) File "zdtm.py", line 469, in set_test os.makedirs(self.__dump_path) File "/usr/lib/python2.7/os.py", line 157, in makedirs mkdir(name, mode) OSError: [Errno 17] File exists: 'dump/zdtm/live/static/sock_opts00/153' Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "zdtm.py", line 46, in clean_tests_root os.rmdir(tests_root) OSError: [Errno 16] Device or resource busy: '/tmp/criu-root-MmGEQD' Error in sys.exitfunc: Traceback (most recent call last): File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "zdtm.py", line 46, in clean_tests_root os.rmdir(tests_root) OSError: [Errno 16] Device or resource busy: '/tmp/criu-root-MmGEQD' Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In case of migrating filesystem with nonpersistent inodes\devices we may hit the case where we successfully dump the container but on restore we will fail because block device get another id (while its contents might be fully sinc'ed). In this case we will try to lookup device from its number carried in image and fail. Instead lets do an optimistic approach -- always try to fetch the watchee path first and if it fails go down to old scheme where irmap and native handle steps into account. https://jira.sw.ru/browse/PSBM-40871Reported-by:
Nikita Spiridonov <nspiridonov@odin.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Adrian Reber authored
Right now only x86 supports dumping and checking the cpuinfo. All other architectures are returning -ENOTSUP and thus p.haul fails if started without '--force'. This adds -ENOTSUP to the RPC field cr_errno in the case cpuinfo dumping and checking failed with this return code. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
On debian/ubuntu systems, we don't have a /bin/env by default; on rhel systems (my limited testing seems to indcate that) /usr/bin/env is a symlink to /bin/env, so let's just use that so it works everywhere. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Tycho Andersen authored
This directory is generated by the install-crit target, so let's .gitignore it and clean it on `make clean`. Signed-off-by:
Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The restorer prints pointer addresses in error codes Reported-by:
Artem Kuzmitskiy <artem.kuzmitskiy@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Reported-by:
Artem Kuzmitskiy <artem.kuzmitskiy@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It's very inconvenient to read the zdtm.py output with long lines of options. Reported-by:
Andrey Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Asked-by:
Andrey Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Otherwise make's output appears in logs before zdtm.py's one Reported-by:
Andrey Vagin <avagin@odin.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrew Vagin authored
Signed-off-by:
Andrew Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-