Commit Graph

16 Commits

Author SHA1 Message Date
Gao feng 27f4b56e71 implement hyper_cmd_read_file
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-17 20:28:31 +08:00
Gao feng 2262bc18fe accept read raw data from write message
It's difficult to encode the json with special characters such as '"', '>'...
encoding and unicoding these characters will change the length of json message,
it's a pain to get bytes contains these characters from json.

This patch allows to read the bytes contains special character outside the json.
for example:
{"container":"c5f67934326d2ecef59fee62148bc9237e2481cd803cc0760a6406da15f4ee60","file":"/tmp/aaa"}sssssss

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-17 16:18:32 +08:00
Gao feng bc0e688f96 implemet hyper_cmd_write_file
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-17 00:44:54 +08:00
Gao feng 2fb02c57b6 set cloexec flag on socket pair
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-16 23:39:01 +08:00
Gao feng 6976865176 cleanup
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-16 20:14:48 +08:00
Gao feng c862b89079 running contianers in the pid ns of pod init
manpage of setns says:

>CLONE_NEWPID behaves somewhat differently from the other nstype values: reassociating the calling thread with a PID namespace changes only the PID namespace that child processes of the  caller  will
>be created in; it does not change the PID namespace of the caller itself.  Reassociating with a PID namespace is allowed only if the PID namespace specified by fd is a descendant (child, grandchild,
>etc.)  of the PID namespace of the caller.  For further details on PID namespaces, see pid_namespaces(7).

so clone a temporary process to enter pid ns, and then create containers. and join them to the other nss of pod init.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-16 18:54:56 +08:00
Gao feng 6a15977238 create container process in hyper init
Move most of functions from pod init to hyper init.
this makes logic more clearer

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-16 16:47:43 +08:00
Gao feng ed9a351518 introduce hyper_parse_write_file
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-09-15 23:22:38 +08:00
Lai Jiangshan e7e6b98958 Merge pull request #2 from gao-feng/dns
support setting up dns for container
2015-08-28 18:04:10 +08:00
Gao feng 2f27b48f7b setup dns for container
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-08-27 22:46:14 +08:00
Gao feng 01f07fb952 remove channel in pod
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2015-08-27 22:42:57 +08:00
Gao feng 6680827faf send kill signal if term is ignored by container process
Fix the bug that stoppod is blocked.

Signed-off-by: Gao feng <feng@hyper.sh>
2015-08-13 16:52:36 +08:00
Gao feng aa265352ff send Next message to hyper in vbox environment
Signed-off-by: Gao feng <feng@hyper.sh>
2015-08-06 10:21:05 +08:00
Gao feng 1b9789937f Add VirtualBox support
Run hyperStart on VirtualBox

Signed-off-by: Gao feng <feng@hyper.sh>
2015-07-30 15:57:44 +08:00
Wang Xu 46ffda72bd add cache parameter for 9p mount
Signed-off-by: Wang Xu <gnawux@gmail.com>
2015-07-06 10:41:57 +08:00
Gao feng 6dc013fc59 hyperStart source code
The files under src directory is the codes of hyperStart,
use autogen.sh && configure && make to generate hyper-initrd.img,
this image will be used to start hyper instance.

Signed-off-by: Gao feng <feng@hyper.sh>
2015-05-28 18:59:34 +08:00