- 02 Oct, 2012 1 commit
-
-
Cyrill Gorcunov authored
Otherwise pty tests might fault. Reported-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Sep, 2012 2 commits
-
-
Pavel Emelyanov authored
Call the fini stage even if the dump failed. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When dumping pages we use 3 commands for parasite -- prep, dump (per-vma) and fini. Open the pagemap file in prep, insteam of in each per-vma dump. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 02 Oct, 2012 5 commits
-
-
Cyrill Gorcunov authored
The system termios structure and our PB equivalent defined quite different, while first defined as plain array we use dynamically allocated memory. Thus the use of min() macro is incorrect here and always produce the size of pointer. Fix it using the size of array from the system provided structure. The BUILD_BUG_ON will prevent from accidental changes. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Test pty03 is not yet ready for ns, will be addressed later. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
In case if we enter the new rootfs don't forget to mount devpts, otherwise ttys can't be connected. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
We don't need to umount each points one by one, 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. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
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 6 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>
-