- 21 Apr, 2019 40 commits
-
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Acked-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Acked-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
The header "lsm.h" was added in crtools.c with commit 6af96c84 and it became unused after commit 09c131c8. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
The option --lsm-profile was added with commit: 6af96c84 lsm: add a --lsm-profile flag In LXD, we use the container name in the LSM profile. If the container name is changed on migrate (on the host side), we want to use a different LSM profile name (a. la. --cgroup-root). This flag adds that support. A usage example is available in https://github.com/lxc/lxc/commit/13389b2963692a51162c703d8a64a79542b18949Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
The --tcp-close option was introduced with commit 2c370428 tcp: Add tcp-close option to restore connected TCP sockets in closed state This options is applicable only for restore. Therefore, move the documentation from 'dump' to 'restore'. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
The --log-pid option was introduced with commit fc7bedc5 crtools: make to be able to split messages by pid This option is applicable only for restore. Therefore, move the documentation from "Common options" to "restore". Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
The current behaviour of CRIU is to inherit the group leader of the parent process when migrating a session leader (with --shell-job). However, it is possible for a process to be group leader without being a session leader (e.g. a shell process). In this case CRIU should restore the original group ID of the process and inherit only the session ID. Closes #593 Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Reviewed-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
getsid(0) and getpgid(0) will return session ID and PGID of the calling process. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Jeff Law authored
I received this patch from Jeff Law as a fix for build failures with the upcoming GCC 9. The following is Jeff Law's description of the patch: Attached you'll find the fix for criu. You'll see it's just a matter of dropping the sp/esp clobber from the relevant asm statements. THe details: criu has a macro which defines an asm which appears to want to set a new stack pointer, then directly issue a sigreturn call to the kernel. Some variants clobber sp (aarch64, arm, x86), others do not (ppc, s390) While the asm does indeed set a new stack pointer, we never return from a sigreturn syscall -- at least not in the normal way. We actually return back to the point where the process was interrupted by the signal. So describing the affect of the asm on the stack pointer is pedantically correct, it actually has no real effect and can just be dropped to avoid the hard error from gcc-9. Suggested-by:
Jeff Law <law@redhat.com> Reviewed-by:
Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
In commit c1404f66 mount: restore cwd after creating a roots yard (v2) were introduced changes to the function cleanup_mnt_ns() that handle the case when opts.root is set. However, after commit 2e8970be mount: create a mount point for the root mount namespace in the roots yard the cleanup_mnt_ns() function always results in error: mnt: Can't remove the directory ...: No such file or directory when restore fails and opts.root has been set. Resolves #467 Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
The test library has functions to create tcp sockets. Cc: Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com> Reviewed-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Adrian Reber authored
Up until now any pr_* logging command (except pr_msg) was lost if logging has not been set up (log_init()). To make sure not logging messages are lost, vprint_on_level() now writes all messages (except LOG_MSG) to a temporary buffer which is written to the logging FD once that is set up. Improved-by:
Andrei Vagin <avagin@gmail.com> Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Pavel Tikhomirov authored
Error messages in linkat_hard and open_path about link errors contradict each other, fix the wrong one. Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Cyrill Gorcunov authored
In regular checkpoint (not "check" action) current architecture implies that basic diag modules such as tcp/udp and etc will be loaded. In turn raw diag in most case is either unloaded or even not compiled in the system. Thus for them just zap an error (but print this information inside log). If an application does use raw sockets in real we will fail later when being checkpointing the sockets itselves. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Cyrill Gorcunov authored
So we would always know what is happening even if module is nor compiled or supported. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Cyrill Gorcunov authored
Lets just use regular pr_perror helper prefix without additional 'ERROR' keyword which may confuse external tools. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Cyrill Gorcunov authored
For example if diag module is not built then we should not spam with error message but we will print an error if only a particular socket is really used. v2: - continue passing @ns into error handler because it should be balanced with receieve handler by number of arguments; while we don't use it yet in our handlers better to reserve it immediately for future use; - strictly speaking probing raw diag module has not much sense by now -- the kernel doesn't support its autoloading in some versions; still for code consistency we should do the same things for all modules. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Cyrill Gorcunov authored
To be able to zap error messages when needed. Without error handler we will continue printing error. This will placate diag modules probing since they are not mandatory features. Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Changes since v1: - Refactor test case based on Andrei's comments Changes since v2: - Use ZDTM_FAMILY instead of AF_INET Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Show a note that when libbsd is not installed CRIU is compiled without setproctitle() and strlcpy() support. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Acked-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
This patch fixes the error: (00.074175) Error (criu/net.c:2638): Locking network failed: iptables-restore returned -1. This may be connected to disabled CONFIG_NETFILTER_XT_MARK kernel build config option. Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
Currently, we rely on the fact that nobody else is using random and parent and child processes will get the same random values. Now, this test fails on the fedora rawhide. There will be nothing wrong if we will generate test messages before forking the test process. Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
open_proc_pid(PROC_SELF) returns a non-service file descriptor, but it can take a place of a target file descriptor. Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Andrei Vagin authored
C/R in Docker from the stable repo is broken. Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Cyrill Gorcunov authored
Not needed since e2bd7af9Signed-off-by:
Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Adrian Reber authored
The relevant test case test_rpc_with_configuration_file_overwriting_rpc() was actually designed around the broken behaviour. It was only working if a previous configuration file (set via environment variable in this case) and the RPC configuration file have the same name. The test case which tests that RPC configuration file settings are overwriting direct RPC settings now makes sure that no other configuration file is set via the environment variable. If it would be set, the test case would still succeed, even with the previous patch applied. Which is and which was the correct behaviour. So the main reason for this change is to test the more likely use case that the environment based configuration file and the RPC configuration file have different names. Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Adrian Reber authored
While writing runc test cases to verify that runc correctly uses RPC configuration files it became clear that some things were not working as they are supposed to. Looking closer at the code to set log files via RPC configuration files I discovered that the code seems wrong (at least I did not understand it any more (or the intentions behind it)). This code tries to simplify that logic a bit and add more comments to make clear what the intentions of the RPC configuration file code is. v2: - fix existing test case to test better (more correct) - make changes requested by Andrei v3: - more changes as requested by Andrei Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Adrian Reber authored
By accident I found a segfault using pre-dump in combination with the page-server. Doing the following I was able to trigger it: * criu page-server -D /tmp/1 * criu pre-dump -t PID -D /tmp/3 --track-mem * criu page-server -D /tmp/4 --prev-images-dir ../1 * criu pre-dump -t PID -D /tmp/3 --track-mem --> segfault ... (00.010090) Warn (criu/image.c:134): Failed to open parent directory ... (00.012984) Error (criu/mem.c:318): Pid-reuse detection failed: no parent inventory, check warnings in get_parent_stats ... (00.013037) Error (criu/mem.c:544): Can't dump page with parasite ... (00.013955) Pre-dumping tasks' memory (00.013966) Pre-dumping 8793 (00.014380) Transferring pages: Segmentation fault (core dumped) Looking in cr-dump.c at cr_pre_dump_finish(int ret) the function gets the return code of the previous operations in 'ret' but it is immediately overwritten and never used. In older CRIU versions it used to be: if (ret < 0) goto err; but that is gone now. So this reintroduces the check for the int parameter given to cr_pre_dump_finish() by the function caller. As the commands used to trigged the segfault do not make much sense the result is still not usable and the same 'Warn' and 'Error' messages are printed, but the segfault is gone. V2: * set the return value correctly Signed-off-by:
Adrian Reber <areber@redhat.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Kir Kolyshkin authored
This avoids installing .gitignore file to compel includes. While at it, describe why this .gitignore is needed. Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Kir Kolyshkin authored
No need to use either -r (recursive) or -f (force). Signed-off-by:
Kir Kolyshkin <kolyshkin@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Pavel Tikhomirov authored
As these function is never used outside of criu/mount.c Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Pavel Tikhomirov authored
rmntns_root - is fd number of opened mntns root directory, these info doesn't help to identify mntns involved in logs, show path to these mntns instead. Signed-off-by:
Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Mike Rapoport authored
Signed-off-by:
Mike Rapoport <rppt@linux.ibm.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Mike Rapoport authored
Using --lazy-pages with pre-dump causes partial memory dump and it's not the intention. The whole point of pre-dump is to keep amount of memory that would be dumped during tasks freeze to minimum. Disallow running pre-dump with --lazy-pages. Signed-off-by:
Mike Rapoport <rppt@linux.ibm.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-
Radostin Stoyanov authored
The macro __list_for_each is equivalent to list_for_each and it is not used anywhere. Signed-off-by:
Radostin Stoyanov <rstoyanov1@gmail.com> Signed-off-by:
Andrei Vagin <avagin@gmail.com>
-