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
4011640b08
Merge pull request #189 from laijs/symlink-EEXIST
...
ignore the errno EEXIST when symlink for /dev/fd & /dev/std*
2016-09-26 18:21:14 +08:00
Lai Jiangshan
db6f286244
ignore the errno EEXIST when symlink for /dev/fd & /dev/std*
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-26 17:51:49 +08:00
Lai Jiangshan
b2e7a0f631
Merge pull request #188 from laijs/check-result
...
check the return value of the functions declared with warn_unused_result
2016-09-26 15:19:53 +08:00
Lai Jiangshan
f4ad330a75
Merge pull request #187 from laijs/exec-cid-cleanup
...
cleanups for exec-id
2016-09-26 15:15:31 +08:00
Lai Jiangshan
54f5362a03
check the return value of the functions declared with warn_unused_result
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-25 19:58:29 +08:00
Lai Jiangshan
45967cc8b8
rename exec->id to exec->container_id
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-25 10:28:21 +08:00
Lai Jiangshan
728d02983e
remove local variable path
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-25 10:12:31 +08:00
Lai Jiangshan
4e830d77b4
check exec->seq and exec->id earlier
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-25 10:08:21 +08:00
Lai Jiangshan
2a669f0558
Merge pull request #186 from laijs/stdio-cleanup
...
save ptymaster on exec->ptyfd and do some cleanups for stdio
2016-09-24 23:26:13 +08:00
Lai Jiangshan
5ed9195bf8
move setsid() out from hyper_install_process_stdio()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-23 23:25:13 +08:00
Lai Jiangshan
064879ff0a
rename hyper_dup_exec_tty() to hyper_install_process_stdio()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-23 23:25:13 +08:00
Lai Jiangshan
2360c4dc3f
use ptyslave instead of e->ptyfd to make code clean
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-23 23:25:13 +08:00
Lai Jiangshan
da72799c96
close ptymaster when failed
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-23 23:25:13 +08:00
Lai Jiangshan
56198c3acd
save ptymaster on ptyfd rather than pty slave
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-23 23:25:13 +08:00
Lai Jiangshan
a07cabf2d0
Merge pull request #184 from gao-feng/status
...
shutdown vm immediately if no container remained
2016-09-23 14:36:35 +08:00
Lai Jiangshan
440e14cde4
Merge pull request #183 from laijs/check-close
...
check close before discarding the data
2016-09-23 13:21:21 +08:00
Lai Jiangshan
5b1b29593e
check close before discarding the data
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-23 12:06:52 +08:00
Gao feng
519db047fb
shutdown vm immediately if no container remained
...
Hyperstart may receive destroy-event after all of the
containers are exited, then hyper_destroy_pod will still
try to term all processes, but there are no container will
exit and trigger the sending out podfinished-event/ack-event
logic in hyper_release_exec.
Add exec to global list only after process is running,
And add remains after container is running.
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-23 11:39:24 +08:00
Lai Jiangshan
504218c41f
Merge pull request #179 from laijs/event-read
...
event read handling refactor part1
2016-09-22 23:21:08 +08:00
Lai Jiangshan
c0e8d92d9a
Merge pull request #180 from crook/master
...
remove unexpectedly cd ..
2016-09-21 21:34:10 +08:00
Lai Jiangshan
be7654b416
remove the unused struct hyper_event_ops::len_offset
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 21:26:09 +08:00
Lai Jiangshan
1cf932a784
introduce CONTROL_HEADER_SIZE & CONTROL_HEADER_LENGTH_OFFSET
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 21:24:56 +08:00
Lai Jiangshan
5c30a49c27
introduce STREAM_HEADER_SIZE & STREAM_HEADER_LENGTH_OFFSET
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 20:41:02 +08:00
Ray Chen
4b662dd4fa
remove unexpectedly cd ..
2016-09-21 20:34:06 +08:00
Lai Jiangshan
13a58d6531
Merge pull request #178 from gao-feng/rename
...
some cleanup
2016-09-21 20:18:13 +08:00
Lai Jiangshan
ecf00fc578
remove the unused struct hyper_event_ops::handle
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 18:38:17 +08:00
Lai Jiangshan
819f639334
directly call hyper_channel_handle() in hyper_channel_read()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 18:36:10 +08:00
Lai Jiangshan
cdc84ecb4b
remove the unused struct hyper_event_ops::ack
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 18:33:22 +08:00
Lai Jiangshan
9d7a6c0a0f
remove hyper_event_read()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 18:22:04 +08:00
Lai Jiangshan
d9e871409e
introduce hyper_channel_read()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 18:13:36 +08:00
Lai Jiangshan
bb5c2c5744
call hyper_ttyfd_handle() directly in hyper_ttyfd_read()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 17:08:43 +08:00
Lai Jiangshan
2f2be98cff
introduce hyper_ttyfd_read()
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 16:59:33 +08:00
Lai Jiangshan
28ea806216
introduce nonblock_read()
...
and call it in hyper_event_read()
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-21 16:59:18 +08:00
Gao feng
8c45a5d6fe
rename type to req_destroy
...
The only usage of type is to identify if the pod
is destroyed by manually.
set the req_destroy inside the switch, this prevents
the other events overwriting this field.
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 21:22:53 +08:00
Gao feng
98262e7e50
cleanup: do not send reply message in hyper_shutdown
...
make hyper_shutdown interface more clearer.
Do the reply in hyper_pod_destroyed.
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 21:22:51 +08:00
Gao feng
ff845ee371
cleanup: remove restart policy type
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 21:17:34 +08:00
Lai Jiangshan
6224d6b779
Merge pull request #173 from gao-feng/cleanup
...
typo: fix debug message
2016-09-20 10:49:39 +08:00
Gao feng
2fb3ad7474
Merge pull request #175 from laijs/ifindex
...
remove ifindex from configs
2016-09-19 22:45:15 -04:00
Lai Jiangshan
82c1ecd25a
Merge pull request #174 from laijs/null-terminated
...
ensure the read buf is null-terminated
2016-09-20 10:36:31 +08:00
Lai Jiangshan
b46bc34498
Merge pull request #172 from gao-feng/stoppod
...
cleanup stoppod
2016-09-20 10:36:02 +08:00
Lai Jiangshan
0c5335b8d5
remove ifindex from configs
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-20 10:33:44 +08:00
Lai Jiangshan
dca1bd6aaa
ensure the read buf is null-terminated
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-20 10:00:14 +08:00
Gao feng
c4f06c3fcd
rename STOPPOD to STOPPOD_DEPRECATED
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 09:53:14 +08:00
Gao feng
92fc1d65a5
typo: fix debug message
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 09:18:03 +08:00
Gao feng
e0bc511a97
Don't support STOPPOD event any more
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 08:06:39 +08:00
Gao feng
46fd62cafd
remove hyper_stop_pod
...
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 09:22:08 +08:00
Gao feng
41438d40d6
remove unnecessary stopping pod if setup pod failed
...
already has hyper_destroy_pod when start pod failed.
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-20 08:05:29 +08:00
Lai Jiangshan
7294253548
Merge pull request #171 from gao-feng/init-fail
...
setup init_pid of pod until pod started successfully
2016-09-19 15:32:27 +08:00
Gao feng
41366ae88a
setup init_pid of pod until pod started successfully
...
In this case, there is no container init running, we cannot expect
hyper_release_exec will be called after terminating all processes.
With this patch, the destroy event will not try to kill running
container processes, it will call shutdown immediately.
Signed-off-by: Gao feng <omarapazanadi@gmail.com >
2016-09-19 14:57:47 +08:00