Commit Graph

337 Commits

Author SHA1 Message Date
Gao feng 1c21bb2e6f Merge pull request #128 from laijs/open-ns
wait until mount namespace fd is opened
2016-07-07 09:14:07 +08:00
Lai Jiangshan b6c6e1f991 wait until mount namespace fd is opened
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-06 19:28:55 +08:00
Gao feng 03187117e1 Merge pull request #127 from laijs/container-and-exec-operations
split container operation to hyper_setup_container() and hyper_run_process()
2016-07-06 19:04:23 +08:00
Lai Jiangshan 54aed5efc5 split container operation to hyper_setup_container() and hyper_run_process()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-06 17:15:42 +08:00
Lai Jiangshan 98b8211ddc move hyper_start_containers() to hyper_start_pod()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-06 15:55:07 +08:00
Lai Jiangshan cd9a8f4306 set early env for exec
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-06 14:05:46 +08:00
Lai Jiangshan bb550c2444 do not apply the container's env on exec
let the hyperd do it. (merge the envs)

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-06 14:05:33 +08:00
Lai Jiangshan 00308d00b5 split hyper_exec_cmd()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-06 11:39:27 +08:00
Gao feng e255de660d Merge pull request #126 from laijs/exec-fork
Exec:  use fork() instead of the fragile clone(CLONE_VM|CLONE_FILES)
2016-07-05 12:58:25 +08:00
Lai Jiangshan ca004ec273 use fork() instead of fragile clone(CLONE_VM|CLONE_FILES)
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-05 10:49:08 +08:00
Lai Jiangshan 52aca5a860 Merge pull request #125 from laijs/rootfs
use /tmp/hyperstart-rootfs as temporary rootfs
2016-07-05 09:50:12 +08:00
Lai Jiangshan 5fcac6f0bb move the call of hyper_watch_exec_pty() to parent(init) process
so we don't need to touch the parent's memory nor file table.

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-04 22:46:50 +08:00
Lai Jiangshan 216bce6fe0 don't wait hyper_do_exec_cmd() via waitpid()
wait it via hyper_get_type()

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-04 22:36:52 +08:00
Lai Jiangshan e8381942d4 send pid back to parent rather than touch the parent's memory directly
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-04 22:12:21 +08:00
Lai Jiangshan 51dc391bc0 all exec should have container id
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-04 21:58:05 +08:00
Lai Jiangshan 73a9c3e8e9 use /tmp/hyperstart-rootfs as temporary rootfs
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-07-04 20:56:00 +08:00
Gao feng 505ad4ddb0 Merge pull request #121 from YaoZengzeng/delete-container
Support for removing container
2016-07-01 11:23:44 +08:00
YaoZengzeng 20158b9033 Support for removing container
Signed-off-by: Yao Zengzeng <yaozengzeng@foxmail.com>
2016-06-30 19:59:18 -07:00
Gao feng 1e6dffd36f Merge pull request #123 from laijs/introduce-parson
Introduce parson
2016-06-30 15:30:48 +08:00
Lai Jiangshan d919414192 use parson to parse kill command
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-30 12:09:15 +08:00
Lai Jiangshan b15d771a56 add const to container id in hyper_find_container()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-30 12:05:01 +08:00
Lai Jiangshan b99768db28 add parson(github.com/kgabis/parson)
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-30 11:17:44 +08:00
Lai Jiangshan 1a612982e8 Merge pull request #122 from gao-feng/cleanup
remove useless field in hyper_pod
2016-06-29 17:13:48 +08:00
Gao feng 3f034fec04 remove useless field in hyper_pod
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-06-29 14:25:41 +08:00
Lai Jiangshan 831113b7d0 Merge pull request #118 from bergwolf/kvm-nested
enable kvm and devmem in guest kernel
2016-06-27 12:18:56 +08:00
Lai Jiangshan 64aeb1ceca Merge pull request #120 from bergwolf/file-vol
support file destination volume
2016-06-27 12:10:59 +08:00
Peng Tao 11c7507eed support file destination volume
If a volume source contains only one file named ".hyper_file_volume_data_do_not_create_on_your_own",
bind mount it as a file to the specified mountpoint inside container's namespace, rather than
mounting its parent directory.

The special name .hyper_file_volume_data_do_not_create_on_your_own is
agreed upon with client which would save a file as this name if it wants
to bind mount a single file rather than a directory.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-06-22 17:36:49 +08:00
Peng Tao 828204c1cf enable kvm and devmem in guest kernel
Also rebase to 4.4.12 release.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-06-08 11:33:02 +08:00
Gao feng 94720f4ace Merge pull request #116 from laijs/exec_process
introduce hyper_exec_process()
2016-06-06 10:34:04 +08:00
Gao feng 12a797cb9e Merge pull request #117 from feiskyer/redirect
Do not add redirect rule if hostport is equal to containerport
2016-06-06 10:26:55 +08:00
Pengfei Ni 7856628d8a Do not add redirect rule if hostport is equal to containerport 2016-06-06 10:06:18 +08:00
Lai Jiangshan 193c1cc97e introduce hyper_exec_process()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:25:21 +08:00
Lai Jiangshan c3eee6616f remove container_setup_tty()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:21:24 +08:00
Lai Jiangshan 3d57690daa send READY a little earlier when creating container
the flush(stdout) is removed, because it is also called
in the following code hyper_dup_exec_tty().

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:21:24 +08:00
Lai Jiangshan 9ca23869fc split container_setup_workdir()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:21:24 +08:00
Lai Jiangshan 72996cd5e8 make hyper_enter_container() static
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:21:24 +08:00
Lai Jiangshan ab6ff1d2bd setup the exec env in hyper_do_exec_cmd()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:21:08 +08:00
Lai Jiangshan 40f04580ec chdir to the specific dir
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-06-05 23:20:15 +08:00
Gao feng 286e0f9c8f Merge pull request #114 from feiskyer/pm
Add external network white list for port mapping
2016-06-03 16:42:07 +08:00
Pengfei Ni 6aa71c3bd9 Fix syntax errors 2016-06-03 16:39:54 +08:00
Pengfei Ni 01a958b209 add external network white list for port mapping 2016-06-03 16:03:02 +08:00
Lai Jiangshan bbba8776ff Merge pull request #113 from ptptptptptpt/cp_kernel_config
cp kernel_config out after making kernel
2016-06-03 14:40:20 +08:00
Pei Tong 34b6af632a cp kernel_config out after making kernel 2016-06-03 14:20:51 +08:00
Lai Jiangshan 99c593a8be Merge pull request #110 from ptptptptptpt/update-kernel
update kernel to 4.4.11; add more kernel modules
2016-05-31 22:54:09 +08:00
Pei Tong 57b130adbb update kernel to 4.4.11; add more kernel modules: netfilter, overlayfs, dm_thin, etc.. 2016-05-31 10:42:03 +00:00
Pengfei Ni 558adb04ab Merge pull request #109 from laijs/modules_directory
add missing modules/ directory
2016-05-30 16:55:36 +08:00
Lai Jiangshan 684dd342d7 add missing modules/ directory
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-05-30 15:04:42 +08:00
Lai Jiangshan 53bdafd2c5 Merge pull request #107 from gao-feng/route
handle null route json message
2016-05-30 11:11:28 +08:00
Gao feng f54f77ccaa Merge pull request #100 from feiskyer/port-mapping
Add port mapping
2016-05-30 09:27:22 +08:00
Pengfei Ni 6065205cb2 tiny fix 2016-05-29 09:19:06 +00:00