- 27 Jun, 2012 22 commits
-
-
Evgeny Antyshev authored
It may occur that the loop spins faster than clock ticks. Signed-off-by:
Evgeny Antyshev <eantyshev@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Looks-cool-to: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
expr prints a substing length. This patch redirects output of expr to /dev/null Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It requered 1m19s for executing all tests. Now it requires 38s. 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> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
Sometime we need sync points in testee program flow, for this reason task_waiter_ introduced. The call semantics is the following Parent Child ------ ----- task_waiter_init task_waiter_wait4 task_waiter_complete task_waiter_wait4 task_waiter_complete ... Thus initially task_waiter_init should be called to initialize all internals guts needed. Then one become waitee and calls for task_waiter_wait4, where lockid should be provided as an argument. Since it should be unique values the best option might be gettid(). The same applies to a waiter side -- it should call for task_waiter_complete and provide a lockid. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrey Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Strictly speaking we have to close all fds before reopening them from the image. This can be done using not yet merged nextfd syscall, but it's not yet merged :( By now just close std and 255 (bash's) descriptors. This is ugly, but I prefer to wait for the nextfd syscall. But skip the init tasks' stds becase the existing zdtm implementation uses system() in such tasks which doesn't work when all fds are closed. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Test with sysfs and proc as no other fs-s are currently supported. Will be fixed later. Note, that the original /proc mount is kept as the dumping code requires it for reading pagemap file with RSS info. Worth fixing it some day? Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
We need own proc for restoring mount namespace, since the proc should be umounted and mounted back diring namespace restore and I don't want to introduce a special kludge for this. One more notice -- the temp proc is mounted _after_ namespaces recreation for the same reason (it will be umounted by prepare_mnt_ns). Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Only support virtual filesystems mount. No bindmounts or disk fs due to non trivial resolving of devices names and binmount sources. Will be implemented later. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
The tree should already be sorted, thus the call for umount shouldn't fail. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Two walkers -- in forward and reverse directions -- are required for correct (u)mounting of subtrees. Implement them using a helper macro which walks the tree in both directions. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Namespace restore goes in two steps -- first, clean old mountpoints (except root) that are left after clone(CLONE_NEWNS) call. Next, repopulate the namespace with new mountpoints (except root) read from the image file. This patch adds the skeleton for the above -- reading the mountpoints from current proc and image and calling for mount/umount. The real action will come in further patches. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Build a tree of mountpoins that can be (u)mounted in a straight (forward or backward) order without EBUSY errors. The tree is built in two steps -- first create hierarchy based on mount iDs. Next -- resort siblings in the path depth order. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Encode it in u32 since we have to check filesystem name anyway (not everyone ie easily migratable). Dump _any_ root fs as we need the root entry on restore though do not mount it then -- it should be provided before crtools restore start. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
Dumping is straightforward -- just copy all the mount_info fields into the new image file. Dump everything but fstype, this one will come in a separate patch. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
This structure will be used on restore and will be created from the image, thus the name proc_ is not suitable. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
On the restore path this structure will be used and it will be better to have them char * rather than char[64]. When scanning proc use the %ms specifier for this. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It's not required more, because parasite_status_t was removed. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
In olden times, when people didn't know how to write, they sent a courier with a letter. Now we can write messages from parasite, so SET_PARASITE_RET may be dropped. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Looks good to me as well. Maybe we will refine messages to be able to identify where exactly parasite failed (say line). But it better to do in another patch. Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Signed-off-by:
Andrey Vagin <avagin@openvz.org> Acked-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 25 Jun, 2012 1 commit
-
-
Cyrill Gorcunov authored
Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Acked-by:
Andrew Vagin <avagin@parallels.com> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 22 Jun, 2012 14 commits
-
-
Cyrill Gorcunov authored
- add argument names - align members - add extern kw - group struct decl. on top - make file_desc_ops::type being unsigned integer similar to fdtype_ops::type Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Cyrill Gorcunov authored
These are declared in files-reg.h, so get rid of them and add files-reg.h inclusion where needed. Signed-off-by:
Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* check, that pseudoterminals are restored * check, that a control terminal is restred Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
2 2 session00 4 4 \_ session00 # {NEWSID, }, 2 5 \_ session00 # {0, }, 8 8 \_ session00 2 9 | \_ session00 # {CHANGESID, } 10 10 \_ session00 11 11 \_ session00 2 12 \_ session00 # {DOUBLE_CHANGESID | CHANGESID, } 2 3 session00 # {DETACH, }, 6 7 session00 # {DETACH|NEWSID, }, 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
Don't fail if a root non-init task has another sid, because it's inherited from parent and can't be restored and it's expected behaviour, when a subtree is dumped. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
Now crtools can restore sid in all cases. A restore of pgid will be added soon and now it will fail on restore. It's prevent testing of restoring SIDs. 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
It's sign, that a parent has been changed sid after forking a child. We should know a sid with which a process was born, because in a processes chain, more then one process might change SID. v2: fix names of variables v3: prevent rewriting of born_sid v4: Abort the restorer with error message if a born_sid can't be determing. Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
* Create helpers for processes which have been reparented to init. * Insert helpers in a process tree. * Helpers will exit after constructing a process tree. v2: fix variables names and check errors v3: add comments in code Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
They will be used for restoring sid. For example, if a session group leader is absent, a helper process is created with this id and it will die after restoring all other tasks. Before this patch restore failed if anyone exited. Now we should skip helpers, which exited successfully. It's a bit tricky. All children are collected in sigchld_handler, but we have a point, where we want to wait all helpers. For that waitpit is used and ECHLD is ignored, because it signs that a helper exited and has been waited in sigchld_handler. v2: check that me isn't NULL in the sig handler v3: move code about waiting helpers in a separate function Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
It will be used for allocating PIDs for helper tasks Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
s/pid/virt/ s/real_pid/real/ Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Andrey Vagin authored
to require dumping pid namespace. Dump and restore will be failed if a tress doesn't contain a process init. pid namespace will be created implicitly if a process init in the tree. v2: fix comments from Pavel v3: Restore of pidns should be approved by user Signed-off-by:
Andrey Vagin <avagin@openvz.org> Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
- 21 Jun, 2012 3 commits
-
-
Pavel Emelyanov authored
Current if/if/else scheme is ... not so easy to understand. Here's an attempt to make it more readable. Bonus: free comments. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
When creating transport we have to find the corresponding fle. Currently this is done by desc list scan %) but this is an overkill -- the required fle is already at our hands. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-
Pavel Emelyanov authored
In the open_fdinfo we need to get a file_desc associated with the given fdinfo_list_entry. This is done by searching the hash of descs, but this can be speeded up by saving the desc pointer on the fdinfo at the time of collecting them. Signed-off-by:
Pavel Emelyanov <xemul@parallels.com>
-