- 02 Oct, 2012 1 commit
-
-
Victor Konyashkin authored
It's need add format to fprintf to avoid following error in Ubuntu 12.04: msg.c:59:2: error: format not a string literal and no format arguments [-Werror=format-security] Signed-off-by:
Victor Konyashkin <vkonyashkin@parallels.com> Acked-by:
Andrey Vagin <avagin@openvz.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Sep, 2012 1 commit
-
-
Andrey Vagin authored
It reads /proc/PID/fd and close all descriptors except service fds. v2: s/is_one_of_service_fds/is_any_service_fd Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 28 Sep, 2012 11 commits
-
-
Andrey Vagin authored
Use the -i <num> option to zdtm.sh Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
All operations with files should be relative to mntns_root Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
sendfile uses sendpage() and all data are splitted on pages and a new skb is allocated for each page. It creates a big overhead on SNDBUF. sendfile() isn't suatable for DGRAM sockets, because message boundaries should be saved. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
If a socket queue doesn't have a free space, a error should be returned, because nobody reads this socket. 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
We don't need to clean_mnt_ns(), if we are goning to do pivot_root(). """ pivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. """ So I suggest to do pivot_root() and then detach the old root, all other mount points will be unmounted automatically. This patch fixes a problem, when a new root is mounted above a non-root mount point. It's a default configuration for OpenVZ. 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 executing an external tools we need to block a SIGCHLD and to juggle file descriptors. SIGCHLD is blocked for getting an exit code. A problem with file descriptors can be if we want to set 2 to STDIN, 1 to STDERR, 0 to STDOUT for example. v2: use helpers reopen_fd_as and move_img_fd 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
Probably sys_recvmsg was used earlier, which returns a error code. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
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 6 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>
-