- 02 Aug, 2012 14 commits
-
-
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 8 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>
-
Pavel Emelyanov authored
Otherwise dump succeeds but is inconsistent. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* s/pidns/ns/ * Add option --namespace mnt to "crtools dump" Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
A part of code has been copied from mountpoints.c This code umounts all points except /proc and / Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If we dump tasks with mntns, we should look at pathes from point of a mntns root. Now we support a situation when a root of an init task has the same root as the mntns root, because we have not another way to get a root of mntns. A path to an unix socket is copied, because the origin copy will be gone out from the function, where it was created. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We need to check that opened files can be restored in mntns [xemul: s/slabinfo/meminfo as in 9dc050fd] Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 31 Jul, 2012 13 commits
-
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Otherwise a parent hangs if a child died, because it reads from a status pipe. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Before this patch we use pidof to get a pid of a test process. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Konstantin Khlebnikov authored
PCLIN-31078 Signed-off-by:
Konstantin Khlebnikov <khlebnikov@openvz.org> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Victor Konyashkin authored
The patch allows define CLONE_NEWIPC for redhat-el5. Signed-off-by:
Victor Konyashkin <vkonyashkin@parallels.com> Acked-by:
Andrey Wagin <avagin@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Victor Konyashkin authored
The patch allows define CLONE_NEWPID for redhat-el5 to avoid error: test_init.c:114: error: 'CLONE_NEWPID' undeclared (first use in this function) Signed-off-by:
Victor Konyashkin <vkonyashkin@parallels.com> Acked-by:
Andrey Wagin <avagin@gmail.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This makes compiler happy. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Since we've BUG_ON(1) here so this is not a problem, but lets make compiler happy. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Compiler doesn't like the ret unitialized here (it's not a problem since SIGMAX is never less than 1). Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Useful if one need a prefix over module messages. I use it in tty c/r, thus having something like | TTY: master 0x31 index 2 fd 6 pid 5079 (create 1) | TTY: `- slave 0x5c index 2 fd 255 pid 5080 (create 0 send 0) | TTY: standalone slave 0x2e index 1 fd 3 pid 5079 (create 1) in log. Which helps filtering messages. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
vkonyashkin authored
The -Wno-unused-result option looks to have been introduced in GCC 4.5.0. So it's need turn off FORTIFY_SOURCE (compiler warn about unused results in fortification mode) instead of use -Wno-unused-result to avoid error in versions prior to 4.5.0. Signed-off-by:
Victor Konyashkin <vkonyashkin@parallels.com> Acked-by:
Andrey Wagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
vkonyashkin authored
Kernel can't suspend container by design if calls clock_gettime() in a loop, so we need to sleep between clock_gettime(). Signed-off-by:
Victor Konyashkin <vkonyashkin@parallels.com> Acked-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
It was accidentally broken by 424a4adb. It's better to use sk ino instead of sk id, since tcp connection may be unbound from any fds (not supported now) and thus there may be no ID for those. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 30 Jul, 2012 1 commit
-
-
Pavel Emelyanov authored
This is a file with ... credits, yes :) While implementing the C/R stuff we've receive a LOT of help from various people and would like to mention them. If we've undeservedly forgotten someone (or something) -- please help us to make amends and send a patch to this file. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Jul, 2012 4 commits
-
-
Cyrill Gorcunov authored
While being debugging problem I found plain BUG_ON is not enough. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kinsbursky Stanislav authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kinsbursky Stanislav authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Kinsbursky Stanislav authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-