- 28 Sep, 2012 1 commit
-
-
Cyrill Gorcunov authored
No need to panic if image corrupted and we can exit out graciously. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Sep, 2012 7 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
By default crtools shouldn't modify the environment, except for killing the dumped tasks. The link remap does so and should sit under explicit cmdline option. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Same as unlink_fstat0x, but leave one link alive. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
These are not ghost, as they are still on fs, so we cannot take them with us in the image. Neither we can easily find the other name of that file. Sad :( To make it work we linkat() the new name to that file using the AT_EMPTY_PATH flag to link directly to the opened fd. If we could openat() the fd's parent we would better do it, but we can't and thus have to create the link name by explicit absolute path :( This modifies the fs we're dumping, so I'll introduce one more cmd line option for that soon. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
For linked remaps we'll use similar technique as for ghost files, but lighter. For that sake make reg_file_info remap to file_remap, not to the whole host_file. 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>
-
- 25 Sep, 2012 3 commits
-
-
Andrey Vagin authored
Restore of namespaces requires executions of external tools (ip, tar, etc). We want to know return codes, so we should block a default sigchld handler. Before we did that for each command, I suggest to block SIGCHLD, then restore namespace and unblock SIGCHLD. The default sigchld handler is used for catching target processes, but all this processes (except a current one ) are started after restoring namespaces. Currently we forgot to block SIGCHLD before executing "ip", and this bug was caught. Reported-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Forgot to handle an error path in a one place. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It seems otherwise older gcc compilers do treat this statement as incomplete. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Reported-by:
Huang Qiang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 20 Sep, 2012 4 commits
-
-
Pavel Emelyanov authored
The biggest acheivement since v0.1 -- initial support for LXC containers! Other less notable (but still great) things done are: * Implemented support for TTY-s * Added support for packet sockets * Bug-fix here and there Note, that images generated by v0.1 tool are accepted by v0.2 one. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
We don't support yet detached terminals migration, so fail early if we can't proceed. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need it to verify that live tty pairs exist. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
To trace paired ttys we will need one more bitmap so rename tty_test_and_set_index to tty_test_and_set because we will need this helper in another context. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 19 Sep, 2012 7 commits
-
-
Pavel Emelyanov authored
CC ipc_ns.o ipc_ns.c: In function ‘dump_ipc_msg’: ipc_ns.c:240:2: error: ‘message’ may be used uninitialized in this function [-Werror=uninitialized] ipc_ns.c:192:17: note: ‘message’ was declared here cc1: all warnings being treated as errors Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Stanislav Kinsbursky authored
Signed-off-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Tested-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
We do have build-time tests for that but it's not enough, better to be on safe side and double check the arguments size. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
rcv_wscale is a symetric parameter with snd_wscale. Both this parameters are set on a connection handshake. Without this value a remote window size can't be interpreted correctly, because a value from a packet should be shifted on rcv_wscale. This patch doesn't break a back compatibility, a rcv window will be restored with the same bug (rcv_wscale = 0). v2: Update to a new kernel interface: [PATCH] tcp: restore rcv_wscale in a repair mode (v2) Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Before 256 bytes were used for that, it may be not enough. For example it was not enough for a NFS point on my test system. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In commit 97cfb707 we extended scm_fdset structure up to 7K thus we need to increase the parasite stack size enough to hold it. It was not noticed simply because we were poking arguments area of memory. The memory map of args and stack for parasite look like +-----------+ min address | | | | arguments | v (8K) | | +-----------+ | | | stack | ^ (16K) | | | +-----------+ max address Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 17 Sep, 2012 16 commits
-
-
Cyrill Gorcunov authored
We're under lock anyway. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Otherwise there is a race between files with same names: link(name -> ghost) link(name->ghost) open(name) unlink(name) open(name) -> ENOENT Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
One function is used on restoring and one is used on dumping, so each function has own prefix rst or cpt. The both functions have the same effect, so the main part of the names is same and it describes "unlock_tcp_connections". Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
network-script.sh is used for locking and unlocking network in CT. Here is an example of an LXC config: lxc.console=none lxc.utsname = test-lxc lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0 lxc.network.name = eth0 lxc.mount = /root/test-lxc/etc/fstab lxc.rootfs = /root/test-lxc-root/ Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Restore must not fail after unlocking connections. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Early we moved prepare_shared() to a root task, because several preparation actions should be executed in a target namespace set (e.g.: ghost files). TCP sockets are a subset of init sockets, they should be unlocked before resume. It's convient to do from crtools. An image can't be read more than one time, because we want to send it via network. For this two reasons prepare_shared is spitted in two parts, one for crtools and one for a root task. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
For another netns we don't need to lock separate connections, an external chanel can be locked. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
because here are two types of entries Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Scripts are executed when external actions required. CRTOOLS_SCRIPT_ACTION contains a required action. If a script doesn't know a current action, it should exit with 0. The first usecase will be lock/unlock network. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
TCP_REPAIR should be droppet when a network is unlocked. A network should be unlocked at the last moment, because after this moment restore must not failed, otherwise a state of a tcp connection can be changed and a state of one side in our image will be invalid. v2: use xremalloc instead of mmap and remmap Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Use sys_setsockopt and declare a function in a header as "static inline" Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It shrinks code a bit. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 14 Sep, 2012 2 commits
-
-
Pavel Emelyanov authored
There are places when we have to select which fd to ->open and which to ->receive. To avoid deadlocks we sort them in an ascending order on { pid, fd } pair. Make this idea more formal by introducing an explicit function doing this check and call it where appropriate (pipe.c master selection is also simplified to fit new ... API). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The currently observed list entry should be examined, not the original one. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-