512 Commits

Author SHA1 Message Date
Gao feng
b055f07cbb Merge pull request #222 from laijs/event-hanghup
change policy for event hangup
2016-10-19 13:13:33 +08:00
Lai Jiangshan
a615be817c directly hangup the event when read/write-error on process's stdio
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-19 12:45:30 +08:00
Lai Jiangshan
4fc7dddb53 do not handle hup event if have in/out event
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-19 12:44:32 +08:00
Lai Jiangshan
256c491948 Merge pull request #219 from laijs/flush-stderr
flush stderr also when exit or install new stderr
2016-10-18 10:32:57 +08:00
Lai Jiangshan
9844779c4e Merge pull request #218 from gao-feng/errno
do not call any functions before check errno
2016-10-18 10:32:30 +08:00
Gao feng
b6eff45cc4 do not call any functions before check errno
perror changes the errno, result in the errno checking
of execvp incorrect.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-10-18 10:03:23 +08:00
Lai Jiangshan
6d75e8cc93 flush stderr also when exit or install new stderr
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-17 22:54:10 +08:00
Gao feng
fcc968a004 Merge pull request #205 from amshinde/set-interface-name
Add ability to change interface name while setting up an interface.
2016-10-15 15:42:32 +08:00
Xu Wang
bbb111ea6d Merge pull request #217 from gao-feng/close_stdin_by_container
don't accept any input if stdin is closed by process
2016-10-15 14:08:03 +08:00
Gao feng
88f445ce34 don't accept any input if stdin is closed by process
fix the input after close problem, this will cause
hyperstart panic.

Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-10-15 12:28:34 +08:00
Gao feng
3747b03b70 Merge pull request #216 from gao-feng/logs
fix incorrect logs
2016-10-15 12:21:25 +08:00
Gao feng
b1d90cf796 fix incorrect logs
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-10-15 12:10:22 +08:00
Lai Jiangshan
0470974773 Merge pull request #212 from laijs/non-error-msg
don't send non-error message to stderr
2016-10-15 11:36:18 +08:00
Gao feng
66bcaedf2a Merge pull request #215 from gao-feng/aarch64
aarch64: update readme
2016-10-14 18:04:58 +08:00
Gao feng
6b4a925945 aarch64: update readme
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-10-14 18:03:22 +08:00
Gao feng
ca80a07ede Merge pull request #207 from gao-feng/aarch64
support aarch64
2016-10-14 17:48:44 +08:00
Archana Shinde
467d776b15 Add ability to change interface name while setting up an interface.
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2016-10-13 16:17:51 +00:00
Lai Jiangshan
3293eaa34b don't send non-error message to stderr
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-11 21:20:59 +08:00
Lai Jiangshan
18235fc443 Merge pull request #211 from laijs/remove-some-dead-code
Remove some dead code
2016-10-11 20:54:22 +08:00
Lai Jiangshan
9a406cc3dd remove unsued struct hyper_writter
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-11 18:06:14 +08:00
Lai Jiangshan
d39a4a03f1 remove inet_prefix
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-11 18:02:55 +08:00
Lai Jiangshan
2878ec5890 remove unused hyper_open_serial_dev()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-11 17:33:06 +08:00
Lai Jiangshan
b900783a3b Merge pull request #208 from laijs/Werror
add -Werror for build
2016-10-11 16:47:43 +08:00
Lai Jiangshan
9132f7549d Merge pull request #203 from YaoZengzeng/send-fd-CLONE_FILE
read and write file in parent process whose fd sent by its child process-CLONE_FILE
2016-10-11 16:46:19 +08:00
YaoZengzeng
232afc9538 read and write file in parent process whose fd sent by its child process
Signed-off-by: Yao Zengzeng <yaozengzeng@zju.edu.cn>
2016-10-11 16:28:31 +08:00
Lai Jiangshan
3d0f9b1692 add -Werror for build
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-11 15:27:18 +08:00
Lai Jiangshan
6afbb02017 Merge pull request #206 from laijs/test-from-hypercontainer
test hyperstart from hypercontainer
2016-10-11 10:42:49 +08:00
Lai Jiangshan
7e64971357 test hyperstart from hypercontainer
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-11 10:29:55 +08:00
Lai Jiangshan
eb59290a59 Merge pull request #191 from devimc/topic/remove_busybox_dependency
Use binaries from PATH
2016-10-10 10:29:47 +08:00
Gao feng
dc46e20caa support aarch64
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-10-09 20:25:05 +08:00
Xu Wang
8fdd03c635 Merge pull request #197 from gao-feng/rbuf
realloc read buffer for control channel
2016-10-09 15:29:54 +08:00
Lai Jiangshan
807ef53908 Merge pull request #200 from laijs/container-exit
move hyper_kill_container_processes() up
2016-10-09 14:56:40 +08:00
Gao feng
1acd0280e8 Merge pull request #201 from feiskyer/open
Open all connections from internal networks
2016-10-09 12:04:16 +08:00
Xu Wang
2e3bc177ea Merge pull request #202 from feiskyer/travis
Add travis
2016-10-08 14:04:13 +08:00
Pengfei Ni
ec20f8ab0a Add travis 2016-10-08 13:25:00 +08:00
Pengfei Ni
648d99fa64 Open all ports for internal networks 2016-10-08 13:16:10 +08:00
Gao feng
2621a406cf Merge pull request #196 from devimc/topic/rescan_scsi
hyperstart should not end when rescan scsi fails
2016-10-05 20:09:07 -04:00
Julio Montes
72a049a72d hyperstart should not end when rescan scsi fails
Signed-off-by: Julio Montes <julio.montes@intel.com>
2016-10-03 14:14:06 -05:00
Lai Jiangshan
1fda991fee move hyper_kill_container_processes() up
hyper_kill_container_processes() depends on container->ns,
but hyper_release_exec() may calls hyper_cleanup_pod() which
calls hyper_cleanup_containers() and then hyper_cleanup_container(),
and container->ns is closed in hyper_cleanup_container().
It cause hyper_kill_container_processes() failed to
stat the container->ns.

[root@box ~]# grep 'fail to stat mnt ns' /var/log/hyper/ -rIn -l
/var/log/hyper/hyperd.sbox.root.log.INFO.20160923-231500.17245
/var/log/hyper/hyperd.sbox.root.log.INFO.20160925-100719.3091
/var/log/hyper/hyperd.sbox.root.log.INFO.20160925-104216.3720
/var/log/hyper/hyperd.sbox.root.log.INFO.20160925-195450.8766
/var/log/hyper/hyperd.sbox.root.log.INFO.20160926-150357.7493
/var/log/hyper/hyperd.sbox.root.log.INFO.20160926-151213.10722
/var/log/hyper/hyperd.sbox.root.log.INFO.20160926-151555.13867
/var/log/hyper/hyperd.sbox.root.log.INFO.20160926-152510.22823
/var/log/hyper/hyperd.sbox.root.log.INFO.20160926-171120.2454
/var/log/hyper/hyperd.sbox.root.log.INFO.20160926-174512.3308
/var/log/hyper/hyperd.sbox.root.log.INFO.20160928-153012.27740
/var/log/hyper/hyperd.sbox.root.log.INFO.20160929-214026.17673
/var/log/hyper/hyperd.sbox.root.log.INFO.20160929-222011.18735
/var/log/hyper/hyperd.sbox.root.log.INFO.20161001-004225.5899
[root@box ~]# grep 'fail to stat mnt ns' /var/log/hyper/ -rIn -l | wc
     14      14     875

it can be triggered via 'hyperctl run -t ubuntu' and then 'exit'
in the shell of the container.

so we have to swap the order of hyper_kill_container_processes
and hyper_release_exec().

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-02 21:28:14 +08:00
Lai Jiangshan
9077cf47b3 Merge pull request #199 from laijs/rename
rename stdio related functions
2016-10-02 20:36:48 +08:00
Lai Jiangshan
ac4d6d8fc7 rename stdio related functions
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-10-01 00:59:42 +08:00
Julio Montes
b232c8fcc9 Use binaries from PATH
Link binaries /busybox and /iptables to /bin/ and /sbin/

Signed-off-by: Julio Montes <julio.montes@intel.com>
2016-09-30 11:54:09 -05:00
Lai Jiangshan
cb680e280d Merge pull request #195 from laijs/stdio_config
add struct stdio_config for fds
2016-10-01 00:41:25 +08:00
Gao feng
7401981c22 realloc read buffer for control channel
Signed-off-by: Gao feng <omarapazanadi@gmail.com>
2016-09-30 10:43:14 +08:00
Lai Jiangshan
83c3c1d424 add struct stdio_config for fds
directly close init/exec process stdio fds at the end of
hyper_run_process().

move exec->std*ev code into hyper_watch_exec_pty().

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-09-29 22:28:27 +08:00
Lai Jiangshan
9cd968e2d2 move hyper_watch_exec_pty() after get the process pid
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-09-29 20:13:53 +08:00
Lai Jiangshan
290217c87a Merge pull request #193 from laijs/remove-unused-hyper_cleanup_exec
Remove unused hyper_cleanup_exec()
2016-09-29 11:49:30 +08:00
Gao feng
39c027e58c Merge pull request #192 from laijs/no-EPOLLPRI
remove the usage of EPOLLPRI
2016-09-28 03:37:30 -04:00
Lai Jiangshan
22cfaea4d2 remove block out from send_exec_finishing()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-09-28 15:36:59 +08:00
Lai Jiangshan
e3704f66ba remove unused hyper_cleanup_exec()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
2016-09-28 15:36:59 +08:00