Commit Graph

276 Commits

Author SHA1 Message Date
Gao feng d2daea2927 Merge pull request #108 from laijs/kernel-build
update kernel build
2016-05-27 19:25:34 +08:00
Lai Jiangshan f4493e59f9 update kernel build
build kernel/modules in the hyperstart-dev:latest container
remove build/modules/ directroy and add modules.tar instead

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-05-27 18:29:03 +08:00
Lai Jiangshan aea6029ba1 Merge pull request #105 from gao-feng/route
support setup routes separately
2016-05-25 21:23:20 +08:00
Xu Wang fcc973cda6 Merge pull request #106 from gnawux/release_06
bump version to 0.6.0
v0.6.0
2016-05-25 19:35:33 +08:00
Gao feng 0896a874c7 fix incorrect error message
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-25 15:31:36 +08:00
Gao feng 53ffb48e0a support setup routes separately
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-25 15:31:34 +08:00
Xu Wang a70c3cfb54 bump version to 0.6.0 2016-05-25 14:44:33 +08:00
Xu Wang 1a4a6794e0 Merge pull request #86 from bergwolf/9p-getattr
9p getattr hack
2016-05-25 12:53:31 +08:00
Lai Jiangshan 8024730027 Merge pull request #104 from gao-feng/fd
close fd in hyper_create
2016-05-24 16:08:35 +08:00
Gao feng 211eb96eb6 close fd in hyper_create
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-24 15:59:17 +08:00
Lai Jiangshan 5b7069c8b4 Merge pull request #102 from laijs/HOME-env
set the HOME env correctly when it is not configured
2016-05-20 07:57:27 +08:00
Lai Jiangshan ece6aa1a79 set the HOME env correctly when it is not configured
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-05-19 20:36:04 +08:00
Lai Jiangshan 185cfb9fe4 Merge pull request #95 from gao-feng/interface
support setup interface command
2016-05-19 14:02:38 +08:00
Gao feng c8b2fee21c Merge pull request #99 from gao-feng/fix
podinit: wait until container environment is ready
2016-05-18 14:56:00 +08:00
Gao feng 9ce56b757e podinit: wait until container environment is ready
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-18 14:48:11 +08:00
Gao feng 72fc9ade82 Merge pull request #98 from gao-feng/exit
use _exit replace exit
2016-05-18 12:33:02 +08:00
Gao feng 05c85499bc use _exit replace exit
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-18 12:32:11 +08:00
Lai Jiangshan 3785a4d02c Merge pull request #94 from gao-feng/exit
make exit code of exec/container consist with docker
2016-05-17 23:17:13 +08:00
Gao feng d74aaa326d make exit code of exec/container consist with docker
The exit code from `docker run` gives information about why the container
failed to run or why it exited.  When `docker run` exits with a non-zero code,
the exit codes follow the `chroot` standard, see below:

**_125_** if the error is with Docker daemon **_itself_**

    $ docker run --foo busybox; echo $?
    # flag provided but not defined: --foo
      See 'docker run --help'.
      125

**_126_** if the **_contained command_** cannot be invoked

    $ docker run busybox /etc; echo $?
    # docker: Error response from daemon: Container command '/etc' could not be invoked.
      126

**_127_** if the **_contained command_** cannot be found

    $ docker run busybox foo; echo $?
    # docker: Error response from daemon: Container command 'foo' not found or does not exist.
      127

**_Exit code_** of **_contained command_** otherwise

    $ docker run busybox /bin/sh -c 'exit 3'; echo $?
    # 3

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-17 15:33:24 +08:00
Gao feng 9615c24fca reagrd exec/start-container success after fork/clone success
If fork/clone failed, return ERROR message to outside.
otherwise ragard exec/start-container success, add
container/exec to exec list, waitpid in init will get
the exec status.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-17 15:33:01 +08:00
Lai Jiangshan 783d711be1 Merge pull request #96 from gao-feng/init-exit
kill processes in container if container init exited
2016-05-17 15:08:11 +08:00
Gao feng 30b3bf772b kill processes in container if container init exited
consist with docker behavior.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-17 11:13:20 +08:00
Lai Jiangshan d69a74be22 Merge pull request #90 from laijs/user
enable the user config
2016-05-16 22:31:19 +08:00
Lai Jiangshan 908797e672 enable the user config
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-05-13 16:34:40 +08:00
Gao feng cf2267cff2 support setup interface command
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-05-12 16:40:56 +08:00
Lai Jiangshan 42ba6daf6d Merge pull request #91 from WeiZhang555/typo
Fix typo
2016-05-10 18:11:06 +08:00
Zhang Wei 61b2963d0d Fix typo
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-05-10 16:36:50 +08:00
Peng Tao c92d2d6430 Merge pull request #87 from laijs/fix-double-free
fix double free bug
2016-05-05 09:26:24 +08:00
Lai Jiangshan 274fa5cd84 fix double free bug
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-05-05 00:33:05 +08:00
Peng Tao baa07ce3f9 9p getattr hack
Update kernel to include 9p's getattr hack to make
fstat after unlink work.

The extra patch is in the kernel_patch directory.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-05-04 23:21:51 +08:00
Peng Tao 402a930af0 Merge pull request #85 from bergwolf/strdup
fix a few strdup memory leaks
2016-04-29 15:37:57 +08:00
Peng Tao 4475e2db1b fix possible memory leak
We are overriding container->image when passed container->scsiaddr. Make
sure we also free its memory if caller also passes the image field.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-04-29 15:36:28 +08:00
Peng Tao 2c12120713 fix two strdup memory leak
Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-04-29 15:36:14 +08:00
Gao feng 84207a3f97 Merge pull request #84 from laijs/allow-container_setup_modules-failed
Allow container_setup_modules() failed
2016-04-29 00:43:50 -05:00
Lai Jiangshan ab1c293818 extend the stack for hyper_container_init()
container_setup_modules() needs a large stack

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-04-27 21:46:03 +08:00
Lai Jiangshan 3fbba94a0f ignore error of setup modules
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-04-27 20:22:42 +08:00
Gao feng a9b7fed072 Merge pull request #81 from laijs/sync-time
sync hardware time to system time when start pod
2016-04-26 21:36:40 -05:00
Gao feng ad196e2fe3 Merge pull request #83 from bergwolf/xfs
xfs needs nouuid mount option
2016-04-25 21:09:35 -05:00
Peng Tao 0c3b80fdbd xfs needs nouuid mount option
Otherwise devicemapper/rbd mount might fail due to device UUID
conflicts on snapshot/clone devices.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-04-25 22:08:43 +08:00
Lai Jiangshan c835eb9dfe sync hardware time to system time when start pod
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-04-25 18:17:06 +08:00
Gao feng 99319c29a6 Merge pull request #79 from gao-feng/module
Add useful modules for hyper container
2016-04-22 20:43:38 -05:00
Gao feng 354c4f44b6 Add useful modules for hyper container
Add cgroup, netfilter, tun, veth and rtc driver.

Note: In some case, kernel will try to use userspace modprobe to
load module, so make sure init mntns has modprobe and modules.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-04-20 17:46:32 +08:00
Gao feng 048ee7ba27 Merge pull request #75 from gao-feng/volume
fix fail to populate volume created by sharefs
2016-04-19 23:37:30 -05:00
Xu Wang 9eef10d3c3 Merge pull request #78 from laijs/hyperd-address
update the github address of the hypercontainer
2016-04-19 00:13:50 +08:00
Lai Jiangshan ecdc3cd339 update the github address of the hypercontainer
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-04-19 00:07:24 +08:00
Xu Wang 4f5b747c2b Merge pull request #76 from bergwolf/setup_dns
recreate /etc/resolv.conf iff specified in pod spec
2016-04-18 18:28:25 +08:00
Peng Tao a0bc0851d6 recreate /etc/resolv.conf iif specified in pod spec
hyperd would inject a default DNS server if user did not specify
it in pod spec. If we recreate resolv.conf here, the injected file
will be lost.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2016-04-17 17:37:52 +08:00
Gao feng c68c7b76d1 fix fail to populate volume created by sharefs
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-04-16 13:46:13 +08:00
Gao feng 9590958aae Merge pull request #70 from laijs/fix-exec-part2-update-API-between-runv-and-hyperstart
Fix exec part2 update api between runv and hyperstart
2016-04-07 21:03:54 -05:00
Lai Jiangshan d3199fcc60 remove defautl setting on tty when exec
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-04-07 16:45:56 +08:00