- 07 Aug, 2012 3 commits
-
-
Pavel Emelyanov authored
The pb_read thing is no longer a macros. This will allow to factor out objects collecting on restore. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The pb_write thing is no longer a macros. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The protobuf-c generate plain routines for entries manipulations, but we want to have some "generic" way of working with messages. Collect them all in an array of descriptors (similar to image files descriptions) and do full typechecking while this. Such thing will allow to simplfy code later. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 06 Aug, 2012 9 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
In addition it fixes error handling. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
[xemul: Added explicit braces into ifs] Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
When processes are restored in PIDNS, the controll process (crtools) don't know a real pid of processes, but it knows a pid of init. crtools can kill init and all other processes will be killed too. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
When a child exited, SIGCHLD is sent to parent, if SIGCHLD has handler without SA_RESTART, the current syscall will be interrupted. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
- Use sizeof instead of PATH_MAX constant - Place EOS exactly after read data end Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 02 Aug, 2012 25 commits
-
-
Pavel Emelyanov authored
Revert and tune 9eda83b7. Andrey reminded me that we have global instance of cr_options. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
On this stage crtools unlink old socket files, create ghost files and etc, so we should be in a correct namespace. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The option is -r|--pivot-root and an argument is a path to new root. A root task will make pivot_root. LXC CT does that, so we need that for restoring. v2: s/pivot-root/root/ Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
The pstree_item for helpers is allocated without rst_info. Before this patch prepare_fd_pid was executed for such items and touched rst_info. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The kernel patch is in 3.5 branch, so we can make this test run automatically. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It's not in zdtm.sh yet, since kernel patch is not yet committed. When kernel is updated, the zdtm.sh will be too. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Only the fact of the fd presence, its flags and fown and the sigmask. The sigpending state is tightly coupled with the task's sigpending state which is not yet supported. 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
The list of mounts is used by inotify to restore a watch with open-by-handle. The problem is that after the clean_mnt_ns is done the mntinfo list is no longer relevant. Fix it by freeing the old one and initializing the new with the read-from-image stuff. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Only checks for lo, one simple ifaddr and two routes are handled. Sanity test and nothing more. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Same here -- run ip tool and that's it. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Just run the ip addr save and ip addr restore respectively. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The thing is that the ip utililty is very likely to have support for ifaddrs and routes dumping and restore (rtnl messages are symmetrical wrt dump/restore and this can be easily dump in there). Thus, the best we can do it just use this tool for that and carry the "raw" images with ifaddrs and routes dump. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Only support the lo device. This is not final yet (much more stuff is to be handled for a link) but is rather a skeleton showing how to do it and letting us check the LXC container early. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
If the target task sits in another netns the sockets will not be able to interconnect unless we create the host-side one in the same netns. Thus do it and then roll back the namespace. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This will be required for parasite transport socket creation -- it will have to be created in a net ns we're putting parasite in and then we'll have to restore it back to original to go on dumping. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We'll need to check whether the socket is to be created in a net namespace (since we can't detect this automatically yet). Thus the namespaces flags are required there. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Raw images are supposed to be files with non-crtools contents. E.g. tarballs with tmpfs contents or iptables-save output. Another example is -- ip tool addr and route dumps we're about to merge soon. Having these type of images allows to use the open_image and the cr_fdset engine easily. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This type of message is also reported for NLM_F_ACK is requested and no necessarilly indicates an error. The error code is in the message body. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Will need it int netns dumping callbacks later. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
All we need is (should be) in rtnetlink.h Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The function that does socket collecting is actually a rtnl request sending one. It will be usefull for netns dump/restore, so move it to generic place. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 01 Aug, 2012 3 commits
-
-
Andrey Vagin authored
We need proc for restoring processes. The existent /proc may be not suitable. E.g. If processes are in pidns. crtools mounts procfs in a temporary directory, but it should be umounted at the end. Before this patch crtools did that, but it doesn't work if processes in a mount namespace. Actually this logic can be simplified and this patch does that. * create a tmp dir * mount procfs * open this directory and save a file descriptor. * detach procfs * remove the tmp dir * access to proc via openat, statat and so on. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When dumping a net namespace we'll have to create the transport socket in the target namespace. In order to do this we'll have to call setns swice -- before and after socket() call. I don't want to do it for every single task to dump, let's cache the socket instead. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Do init and transport sockets interconnections in one switch to parasite. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-