AuthorCommitMessageCommit dateIssues
Pavel EmelyanovPavel Emelyanov
c703e3fd840criu: Version 3.13Here we have some bugfixes, huuuge *.py patch for coding style and nice set of new features like 32bit for ARM, TLS for page server and new mode for CGroups. Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Radostin StoyanovAndrey VaginRadostin Stoyanov
72402c6e7a4py: Fix tabs in code commentsThese were left by yapf formatter Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Pavel EmelyanovAndrey VaginPavel Emelyanov
34dbf67b240pyimages: Add pb2dict.py to checked and fix warnings/errorsSigned-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
6b615ca1527test/others: Reuse setup_swrk()Reduce code duplication by taking setup_swrk() function into a separate module that can be reused in multiple places. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
4c1ee3e2270test/other: Resolve Py3 compatibility issuesWhen Python 2 is not installed we assume that /usr/bin/python refers to version 3 of Python and the executable /usr/bin/python2 does not exist. This commit also resolves a compatibility issue with Popen where in Py2 file descriptors will be inherited by the child process and in Py3 they will be closed by default. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Andrey VaginAndrey Vagin
5aa72e72370py: Reformat everything into pep8 styleAs discussed on the mailing list, current .py files formatting does not conform to the world standard, so we should better reformat it. For this the yapf tool is used. The command I used was yapf -i $(find -name *.py) Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Pavel TikhomirovAndrey VaginPavel Tikhomirov
5ff4fcb753czdtm: make inotify04 require restoreAfter adding the test for fake inotify events cleanup on restore, we've detected that we also have the same problem on dump/predump, criu touches files that are watched and generates fake events: [root@snorch criu]# test/zdtm.py run -t zdtm/static/inotify04 --norst -k always === Run 1/1 ================ zdtm/static/inotify04 ======================== Run zdtm/static/inotify04 in h =======...
Adrian ReberAndrey VaginAdrian Reber
bbd922ed32etravis: add podman test caseThis adds the same tests currently running for docker also for podman. In addition this also tests podman --export/--import (migration) support. Signed-off-by: Adrian Reber <areber@redhat.com>
Sebastiaan van StijnAndrey VaginSebastiaan van Stijn
2a76ecc9fd3README: fix broken links to github.com/xemul/criuSigned-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van StijnAndrey VaginSebastiaan van Stijn
1356a1def3fReplace references to github.com/xemul/criuSigned-off-by: Sebastiaan van Stijn <github@gone.nl>
Andrey VaginAndrey Vagin
4e84d11c1f3kerndat: remove unused codeSigned-off-by: Andrei Vagin <avagin@gmail.com>
Andrey VaginAndrey Vagin
25460af822akerndat: mark functions as static which are used in kerndat.c onlySigned-off-by: Andrei Vagin <avagin@gmail.com>
Dmitry SafonovAndrey VaginDmitry Safonov
f6ab4620748vdso: Correctly track vdso position without vvarIf vvar is absent vdso_before_vvar is initialized by "false". Which means that the check that supposed to track vdso/vvar pair went into wrong brackets. In result it broke CRIU on kernels that don't have vvar mapping. Simpilfy the code by moving the check for VVAR_BAD_SIZE outside of conditional for vdso_before_vvar. Reported-by: Cyrill Gorcunov <gorcunov@gmail.com> Fixes: 0918c7667647 ("vdso...
Andrey VaginAndrey Vagin
5f91f920a87test: bring the lo interface up in each network namespaceThis is needed to workaround the problem with "ip route save": (00.113153) Running ip route save Error: ipv4: FIB table does not exist. Signed-off-by: Andrei Vagin <avagin@gmail.com>
Pavel TikhomirovAndrey VaginPavel Tikhomirov
e5bdcbbd1d9zdtm/inotify: add a test that no unexpected events appear after c/rJust create two inotify watches on a testfile, and do nothing except c/r, it is expected that there is no events in queue after these. before "inotify: cleanup auxiliary events from queue": [root@snorch criu]# ./test/zdtm.py run -t zdtm/static/inotify04 === Run 1/1 ================ zdtm/static/inotify04 ======================== Run zdtm/static/inotify04 in h ======================== DEP ...
Pavel TikhomirovAndrey VaginPavel Tikhomirov
96992883ca7inotify: cleanup auxiliary events from queueI've mentioned the problem that after c/r each inotify receives one or more unexpected events. This happens because our algorithm mixes setting up an inotify watch on the file with opening and closing it. We mix inotify creation and watched file open/close because we need to create the inotify watch on the file from another mntns (generally). And we do a trick opening the file so that it can ...
Dmitry SafonovAndrey VaginDmitry Safonov
10a831689e1restorer: Use gettimeofday() from rt-vdso for log timingsOmit calling raw syscalls and use vdso for the purpose of logging. That will eliminate as much as one-syscall-per-PIE-message. Getting time without switching to kernel will speed up C/R, keeping logs as informative as they were. Fixes: #346 I haven't enabled vdso timings for ia32 applications as it needs more changes and complexity.. Maybe later. Signed-off-by: Dmitry Safonov <dima@arista.co...
Dmitry SafonovAndrey VaginDmitry Safonov
9e5c0634ff2vdso: Add compatible property to vdso_mapsWe need to differ compatible (ia32) vdso maps from x86_64. That dictates ABI on vdso code. According to that, the decision to (not) use gettimeofday() from vdso in 64-bit restorer. Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Dmitry SafonovAndrey VaginDmitry Safonov
23960fe60e4seccomp/restorer: Disable gtod from vdso in strict modeSigned-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Dmitry SafonovAndrey VaginDmitry Safonov
90ecb82202frestorer/parasite-vdso: Don't move vvar if failed to move vdsoAlso slight refactor. Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Dmitry SafonovAndrey VaginDmitry Safonov
53c2fdc955dvdso/restorer: Always track vdso/vvar positions in vdso_maps_rtFor simplicity, make them always valid in restorer. rt->vdso_start will be used to calculate gettimeofday() address. Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Dmitry SafonovAndrey VaginDmitry Safonov
2d521f3c935vdso/restorer: Try best to preserve vdso during restorevdso will be used in restorer for timings in logs - try to keep it during restore process. Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Dmitry SafonovAndrey VaginDmitry Safonov
28949d5fb80compel/std/uapi: Provide setter for gettimeofday()Provide a way to set gettimeofday() function for an infected task. CRIU's parasite & restorer are very voluble as more logs are better than lesser in terms of bug investigations. In all modern kernels there is a way to get time without entering kernel: vdso. So, add a way to reduce the cost of logging without making it less valuable. [I'm not particularly fond of std_log_set_gettimeofday() nam...
Dmitry SafonovAndrey VaginDmitry Safonov
d2d6e3f5379compel/log: Use enum as parameter for std_log_set_loglevel()Doesn't change uapi, but makes it a bit more friendly and documented which loglevel means what for foreign user. Signed-off-by: Dmitry Safonov <dima@arista.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
b25d1facaedpb2dict: Disable undefined name 'basestring'The following error is falsely reported by flake8: lib/py/images/pb2dict.py:266:24: F821 undefined name 'basestring' This error occurs because `basestring` is not available in Python 3, however the if condition on the line above ensures that this error will not occur at run time. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
5721e610003scripts: Install flake8 with dnf in FedoraIn the Fedora tests we install python3-pip only to install flake8. This is not necessary as there is a Fedora package for flake8. Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
2a683849b9bscripts: Set PYTHON=python3 in Fedora DockerfilesSigned-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
cd87a628e14scripts: Remove yaml/ipaddress Py2 fedora modulesSigned-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Pavel TikhomirovAndrey VaginPavel Tikhomirov
77efcde96ddmount: fix inconsistent return and goto err alternationSigned-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Adrian ReberAndrey VaginAdrian Reber
229a8ab06b2scripts: remove python2 from Fedora DockerfilesMore and more python2 packages are being removed from future Fedora releases. This removes python2 packages explicitly listed in CRIU's Dockerfiles, which all are not required for the current level of testing. Signed-off-by: Adrian Reber <areber@redhat.com>
Adrian ReberAndrey VaginAdrian Reber
9fe8960d89fscripts: add possibility to override docker with podmanTo be able to run the test containers in scripts/build with podman this puts the name of the container runtime into $CONTAINER_RUNTIME. Now it can be overridden with make fedora-rawhide CONTAINER_RUNTIME=podman Signed-off-by: Adrian Reber <areber@redhat.com>
Andrey VaginAndrey Vagin
1e2647f1239images: convert type of child_subreaper from int32 to boolSigned-off-by: Andrei Vagin <avagin@gmail.com>
Andrey VaginAndrey Vagin
104aaf383e8restorer: print errors if prctl syscalls failedSigned-off-by: Andrei Vagin <avagin@gmail.com>
Radostin StoyanovAndrey VaginRadostin Stoyanov
ba454407bf8make: Insert version macros in criu.hIncluding the version information of CRIU in criu.h is required by projects that use libcriu to preserve backward compatibility. Closes #738 Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
c01da212da5mem/shmem: Fix typos for_each_shmem macroSince we use _i as a counter in macro declaration we should use it as a reference. This macro simply happen to work now because of being called with variable i declarated in the caller code. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
92717977cd5mem/shmem: Use xmalloc in collect_sysv_shmemTo get error message in log if no memory available. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
67d5dbb9959mem/shmem: More elegant entries declarationSigned-off-by: Cyrill Gorcunov <gorcunov@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
d999a9e0795mem/shmem: Use xrealloc_safe in expand_shmemSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
0319d1bf2e2mem/page-pipe: Use xrealloc_safe in page_pipe_add_holeTo shrink code a bit. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
cb7b013dd01mem/pmc: Print pid for debug sakeWhen logs are massive it is convenient for grepping. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
7eec03bd958mem/pmc: Use pr_warn_once if cache is disabledNo need to spam on every pmc_init call. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
43ac528cb94mem/page-xfer: Add log prefixSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
8f9ae895d04mem/vma: Sanitize struct vm_area_list- make names more descriptive - add comments - use union for nr_priv_pages and rst_priv_size since former priv_size has been used with different meaning: number of pages during checkpoint time and size in bytes on restore moment Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
0ee3d0764ddmem/vma: Drop never used VM_AREA_LIST macroSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
32e9f155254mem/vma: Use vm_area_list_init where appropriateSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
6e86b9eb01fmem/vma: Use memset for vm_area_list_initTo eliminate side effects, in particular setting nr_aios is already missing here. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
f3b8371c309mem/page-pipe: Use ssize_t for splice/tee resultsInteger value is too short. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
692fdada564mem/page-pipe: Align members for readability sakeSigned-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
088b086bfe8mem/page-pipe: create_page_pipe -- Drop redundant zero assignmentWe allocate with xzalloc, no need for additional zero assignemtns. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
Cyrill GorcunovAndrey VaginCyrill Gorcunov
cb946164367mem/page-pipe: Eliminate redundant pipe_off setupIn case if we may use previous pipe the pipe_off get set directly so no need for redundat unconditional assignment. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Acked-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>