Gao feng
2332d39620
Merge pull request #66 from laijs/setup-rootfs-before-chroot
...
Setup mounts&rootfs before chroot
2016-04-04 10:18:19 -05:00
Lai Jiangshan
bc28dfedf8
remove prefix from hyper_find_sd()
...
we always use the intial /sys, so we don't need prefix
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-03 22:47:09 +08:00
Lai Jiangshan
09c0a1b41b
remove oldroot
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-03 22:41:27 +08:00
Lai Jiangshan
b441c1bffe
do container_setup_dns() before move the rootfs
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-03 19:09:11 +08:00
Lai Jiangshan
5be2a71a84
do container_setup_volume() before move the rootfs
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-03 16:52:14 +08:00
Lai Jiangshan
8766f77f24
do container_setup_mount() before move the rootfs
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-03 16:34:08 +08:00
Lai Jiangshan
e4beaad672
Merge pull request #65 from gao-feng/nondocker
...
create volume directory for non docker volume
2016-04-03 13:39:42 +08:00
Gao feng
7f6056fc4c
create volume directory for non docker volume
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-04-03 12:26:24 +08:00
Lai Jiangshan
5ceb9b8906
Merge pull request #64 from gao-feng/volume
...
don't copy data to volume if volume alreay has data
2016-04-02 22:09:35 +08:00
Gao feng
2ace93e881
don't copy data to volume if volume alreay has data
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-04-02 20:22:51 +08:00
Gao feng
abd52a4ae2
Merge pull request #63 from laijs/remove-oldroot-from-mount-source
...
Remove '/.oldroot' from mount source
2016-04-02 05:22:59 -05:00
Lai Jiangshan
76bccbd261
remove "/.oldroot" from mount source
...
before patch:
root@test-container-multi:/# mount
/dev/sdb on / type xfs (rw,relatime,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
/.oldroot/dev/sda on /var/log type ext4 (rw,relatime,stripe=16,data=ordered)
after patch:
root@test-container-multi:/# mount
/dev/sdb on / type xfs (rw,relatime,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota)
/dev/sda on /var/log type ext4 (rw,relatime,stripe=16,data=ordered)
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 17:52:25 +08:00
Lai Jiangshan
8f70de4d49
change the order of basic mount and volume mount
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 17:46:51 +08:00
Lai Jiangshan
ea196f786d
move mount of fsmap into container_setup_volume()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 17:41:55 +08:00
Gao feng
ced3b9dc53
Merge pull request #62 from laijs/mkdir
...
print mkdir info in correct order
2016-04-02 01:04:35 -05:00
Gao feng
5ca0595e4f
Merge pull request #61 from laijs/ptys
...
fix symlink leek
2016-04-02 01:04:19 -05:00
Gao feng
53cd58a121
Merge pull request #60 from laijs/msmove
...
Set the rootfs of the namespace to be the rootfs of the container
2016-04-01 23:05:40 -05:00
Lai Jiangshan
0a86f73869
Set the rootfs of the namespace to be the rootfs of the container
...
we use MS_MOVE to move the container rootfs to /, so that the rootfs
of the namespace and the rootfs of the container are the same.
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 11:54:14 +08:00
Lai Jiangshan
12ba0a42b2
print mkdir info in correct order
...
and only print it when it is needed to be maked.
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 11:37:06 +08:00
Lai Jiangshan
1ad3ffcf63
close ptymaster before exec
...
ptymaster is dup-ed without close-on-exec, we need to colse it.
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 11:29:15 +08:00
Lai Jiangshan
5f9a7ee0a2
reopen slave ptyfd for correcting the symlink path of the /dev/fd/1
...
before patch:
root@ubuntu-4562002641:/# readlink /dev/fd/1
/tmp/hyper/656f914cd9c030214bf95aff8f3bf418c1c277f5b82a661a27a174c9c8ce901b/devpts/3
after patch:
root@ubuntu-5512501784:/# readlink /dev/fd/1
/dev/pts/1
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-02 11:10:48 +08:00
Gao feng
b0c0255148
Merge pull request #58 from gao-feng/initialize
...
support to initialize container environment
2016-04-01 21:48:51 -05:00
Gao feng
6b67c6a296
Merge pull request #59 from laijs/mount-rootfs
...
ensure the container see the mount point of the rootfs
2016-04-01 05:54:48 -05:00
Lai Jiangshan
0017a6110f
ensure the container see the mount point of the rootfs
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-04-01 18:28:32 +08:00
Gao feng
6bbb9ac512
support to initialize container environment
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-04-01 16:48:26 +08:00
Xu Wang
6feb864e30
Merge pull request #57 from feiskyer/fix-cache
...
Do not cache for shared volumes
2016-03-29 11:34:50 +08:00
feisky
6ff04bf83d
Do not cache for shared volumes
2016-03-28 17:45:00 +08:00
Lai Jiangshan
80778ddd25
Merge pull request #56 from laijs/pipe2
...
convert hyper_socketpair() to pipe2
2016-03-28 08:15:03 +08:00
Lai Jiangshan
c455e8bc75
convert hyper_socketpair() to pipe2
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-26 18:23:03 +08:00
feisky
411cffdeec
Merge pull request #55 from laijs/env
...
fix up default environment
2016-03-26 12:12:01 +08:00
Lai Jiangshan
04689c4138
set HOSTNAME environment
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-26 12:03:15 +08:00
Lai Jiangshan
50928fc1ef
set/unset TERM environment based on tty config
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-26 11:44:37 +08:00
Lai Jiangshan
20c34a4312
set HOME environment
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-26 11:39:36 +08:00
Gao feng
fdd2634721
Merge pull request #54 from liusdu/typo
...
fix a tiny typo to avoid compile error
2016-03-19 14:23:00 +00:00
Liu Hua
b043ac88e1
fix a tiny typo to avoid compile error
...
Signed-off-by: Liu Hua <sdu.liu@huawei.com >
2016-03-19 22:03:28 +08:00
Gao feng
5c18914f2a
Merge pull request #53 from laijs/handle-eof
...
Handle eof
2016-03-18 22:25:14 -05:00
Lai Jiangshan
a0e1ecb2ba
handle eof request of stdin
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-19 10:28:19 +08:00
Lai Jiangshan
5279ef3f96
send eof of stdout back to runv ony when release_exec()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-19 10:27:42 +08:00
feisky
36fb6e6877
Merge pull request #52 from gao-feng/tty
...
request to setup tty for exec by default
2016-03-15 12:02:54 +08:00
Gao feng
6632db44ae
request to setup tty for exec by default
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-03-15 11:36:11 +08:00
feisky
613a5a19db
Merge pull request #51 from laijs/pipes-stdio
...
use pipes for stdio when non tty
2016-03-10 17:13:32 +08:00
Lai Jiangshan
21d63485b1
use pipes for stdio when non tty
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-10 00:14:03 +08:00
Lai Jiangshan
eaae1ae3fb
split exec.e into exec.stdinev and exec.stdoutev
...
and rename exec.errev to exec.stderrev
and make stdinev.fd stdoutev.fd stderrev.fd are valid but different
and register all these event
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-09 23:53:59 +08:00
Lai Jiangshan
333263b344
pass @exec to pts_hup()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-09 16:07:53 +08:00
Lai Jiangshan
50db29c634
add stdinfd/stdoutfd and rename errfd to stderrfd
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-09 16:01:17 +08:00
Lai Jiangshan
fe5c6c29e1
use e->errfd directly to create stderr
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-09 15:46:04 +08:00
Lai Jiangshan
34d842901d
always setup exec->errfd
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-09 15:45:48 +08:00
Lai Jiangshan
a94833c482
open /dev/null for ptyfd in hyper_setup_exec_tty() when seq=0
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-09 15:45:37 +08:00
Gao feng
0676ed3227
Merge pull request #50 from laijs/enable-non-tty-stdio
...
Enable non tty stdio
2016-03-09 10:42:48 +08:00
Lai Jiangshan
e12e480f79
change VmContainer's stdio's protocal
...
VmContainer.Tty: allocate tty or not
VmContainer.Stdio: Stdio sequence number
VmContainer.Stderr: Stderr sequence number if stderr is not share with
stdout (currently used when VmContainer.Tty is false)
And new stdio allocation code which respects the VmContainer.Tty.
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-03-08 21:03:34 +08:00