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
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
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
Lai Jiangshan
5edb81f783
Merge pull request #160 from jcvenegas/use-shared-dir-macro
...
Use macro SHARED_DIR for /tmp/hyper/shared path
2016-09-16 13:46:00 +08:00
Jose Carlos Venegas Munoz
eea9702389
Use macro SHARED_DIR for /tmp/hyper/shared path
...
Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com >
2016-09-16 00:37:25 -05:00
Peng Tao
7acbc5e288
Merge pull request #165 from hyperhq/revert-154-mntinit
...
Revert "handle volume special fstype"
2016-09-14 17:38:45 +08:00
Peng Tao
34ec350357
Revert "handle volume special fstype"
2016-09-14 17:35:48 +08:00
Gao feng
b58b03874d
Merge pull request #163 from laijs/c-string
...
enable using api command data as c-string inplace
2016-09-14 05:25:14 -04:00
Gao feng
02b777058d
Merge pull request #164 from laijs/file-command
...
use file_command for reader_file&write_file command
2016-09-14 05:10:25 -04:00
Lai Jiangshan
17f9f7b4cf
use file_command for write_file command
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-14 11:33:01 +08:00
Lai Jiangshan
4fa99f7a5b
rename hyper_reader to file_command
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-14 11:27:20 +08:00
Gao feng
6efb8d2638
Merge pull request #162 from laijs/consume-all-the-data-in-handle
...
Consume all the data in handle()
2016-09-14 10:51:06 +08:00
Lai Jiangshan
e2b79425f1
enable using api command data as c-string inplace
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-14 10:40:03 +08:00
Lai Jiangshan
21cb97d970
always comsume the date after handle()
...
even handle() failed.
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-14 10:17:06 +08:00
Lai Jiangshan
f06259b0b9
direct set the buf->get to zero after consume
...
the handle() had consumed all the read data,
and we don't need to move the leftover data.
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-14 10:12:41 +08:00
Lai Jiangshan
70dd9f1447
Merge pull request #161 from laijs/api-header
...
move constants of API to src/api.h
2016-09-14 10:02:01 +08:00
Lai Jiangshan
8b674e78f5
move constants of API to src/api.h
...
Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com >
2016-09-13 23:47:00 +08:00
Lai Jiangshan
de59d91bc2
Merge pull request #159 from dlespiau/20160912-trivial
...
A few trivial changes
2016-09-13 07:49:11 +08:00
Damien Lespiau
6824ff3d2e
util: Fix 'calss' type in the virtio-ports scanning code
...
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com >
2016-09-12 18:23:03 +01:00