- 30 Oct, 2012 12 commits
-
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Move the checks to parasite_args() and make them build-time. This gets rid of bunch of BUILD_BUG_ON-s in parasite.c. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It seems I've screwed the setup and mount points on my testing machine thus mountpoint test become failing. Nevertheless, better to report where exactly we've failed for easier investigation. With this patch I get | ./mountpoints --pidfile=mountpoints.pid --outfile=mountpoints.out | 20:26:07.398: 1745: umount(`/dev') failed: Device or resource busy | 20:26:07.398: 1745: umount(`/vz') failed: Device or resource busy | 20:26:07.399: 1745: umount(`/vz') failed: Device or resource busy | 20:26:07.399: 1745: umount(`/vz') failed: Device or resource busy | 20:26:07.399: 1745: umount(`/vz') failed: Device or resource busy | 20:26:07.399: 1745: FAIL: mountpoints.c:60: Can't umount all the filesystems (errno = 16) | 20:26:07.404: 1744: ERR: test.c:298: Test exited with unexpectedly with code 1 | (errno = 4) Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
errno is no guaranteed to be clear if call exit with success. Thus make sure we've ret negative here and test for errno then. http://bugzilla.openvz.org/show_bug.cgi?id=2412Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The SO_PEERNAME sockopt reports -EINVAL if the len passed is greater than the real one, and copies part of the address otherwise. Need to pass there "good" optlen not to get -EINVAL falsely. On the other hand, since we only need to check for connected/not-connected it's enough to push there 1 byte. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
It's almost the same as find_first_sid, lets use it instead. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* Increase sizes of tcp rcv and snd bufffers * Fill buffers * Dump/Restore * Check, that all data were restored This test reproduces a problem from buf #2411 v2: don't use test_waitsig() in external processes, because they can be out of this pid name-space. 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
We have own mechanism to restore controlling terminal thus we don't need the kernel to create it in implicit way. #2409 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
It's being found that we fail to restore tasks which are not session leaders but have controlling terminals. This patch reworks tty_find_restoring_task logic to fix the problem. The problem itself basically was the following -- in case if there no sid present even on master peer or on both master/slave peers, we were trying to find a restoring task, and that's wrong since we have peers which do not belong our session. #2409 Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Writing to last_pid sysctl is CAP_SYS_ADMIN potected. Thus restoring creds before it won't work in all the cases. Fix this by making all threads restore creds themselves, and the thread group leader -- after all of them. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrey Vagin <avagin@parallels.com>
-
Andrey Vagin authored
Here are two things: * A test process is a session leader * It has a terminal, which are not conrolling for anyone. For bug #2409 Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 29 Oct, 2012 19 commits
-
-
Cyrill Gorcunov authored
The size of vector depends on the kernel config so use the real size of a vector dumped. Otherwise we might fail on restore. Reported-by:
Stanislav Kinsbursky <skinsbursky@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Threads do not share creds, thus they should restore them from group leader (or restore them in the same state which is less appealing). 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
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The former is actually the parameters of thread group leader, so it's natural to have them on-task. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The tail PTRACE_INTERRUPT/PTRACE_CONT call in parasite calling code is redundant as far as I can say, thus get rid of it. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
For tty migration testing. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Huang Qiang authored
With some historical changes, the second page-aligned for restore_thread_vma_len is reduplicate. So remove it. Signed-off-by:
Huang Qiang <h.huangqiang@huawei.com> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The slave peer should be restoring the controlling terminal. It works for most of programs but need some more investigation in future. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The dumping of tty peers is somewhat tricky. And it became more complex once we allowed to migrate/inherit sessions. It's being found (in screen c/r) that we've a problem in looking up of session leaders while dumping tty. Let me explain with more details. Here is an example of screen session PID GID SID 20567 20567 20567 SCREEN 20568 20568 20568 pts/3 \_ /bin/bash The screen opens master peer (ptmx) and then provides bash the slave peer (pts/3) where bash sets up a session leader on it. Thus we get interesting scenario -- our pstree construction is done in lazy fashion, we run parasite code to fetch sid/pgid of a process tree item only when we're really dumping the task. Thus when we start dumping ptmx peer (which belongs to SCREEN) we've not yet constructed the process tree item for children (ie /bin/bash) and the lookup function in tty code (which walks over all process items in a tree) simply fails to find sid of child, because we've not yet dumped it. Thus, to resolve such situation we verify tty sids at late stage of dumping. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The sid may be present not only on slave peer so fix up the message. Also extend it showing peer type. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This makes this helper more wide usable. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
No need for tricks, we fetch everything we need from the parasite. 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
In case if at checkpoint time we've fetched zero sid associated with tty peer it doesn't obligatory means that we've met a hangig up terminal, in particular zero sid may be obtained if the slave peer do not belong to the session the task run in but inherited from the parent. Thus if --shell-job passed we should handle such situation gracefully. [ https://bugzilla.openvz.org/show_bug.cgi?id=2405 ] Reported-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
This is rather a code tossing for the next patch. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Since we support tty migration, use it here, otherwise it'll fail. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 26 Oct, 2012 3 commits
-
-
Vladimir Davydov authored
For vz containers, monotonic time freezes when a container is checkpointed. This makes the zdtm posix timer test fail. To fix this, obtain time passed, which is used to check timer results, using the clock used by the timer. Signed-off-by:
Vladimir Davydov <vdavydov@parallels.com> Acked-by:
Stanislav Kinsbursky <skinsbursky@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
After sleep 0.9 there occurs sleep 0.10 which is not what we want. Stop incrementing on 0.9 Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Reported-by:
Pavel Emelyanov <xemul@parallels.com> Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 25 Oct, 2012 6 commits
-
-
Cyrill Gorcunov authored
To test new bits we fetch from VmFlags smaps interface. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
If we're provided with madivce() bits -- do restore hits on VMA areas. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
The kernel now supports providing VMA flags via smaps interface so add pasting of them. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Will need it for VMA restore. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
On my testing machine these defs are not present so define them where needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Huang Qiang authored
According to Andrew's advice, change the close file logic a bit, to make the code seems more readable. Signed-off-by:
Huang Qiang <h.huangqiang@huawei.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-