Ted Yu
9a15457064
vc: Check error return from storeState
...
Fixes #2324
This achieves parity with the check on line 293.
Signed-off-by: Ted Yu yuzhihong@gmail.com
2019-12-05 18:55:57 -08:00
Peng Tao
00ff99bcb6
Merge pull request #2306 from jodh-intel/fix-compatoci-logger
...
compatoci: Add a SetLogger call
2019-12-05 13:57:38 +08:00
Fupan Li
84e4d68b13
Merge pull request #2316 from eryugey/dev
...
virtiofs: stop sandbox when virtiofsd quits
2019-12-05 09:06:44 +08:00
Eric Ernst
e3ba17123a
Merge pull request #2296 from tedyu/rm-dev-when-err
...
vc: Remove device when AddDevice encounters error
2019-12-04 14:23:49 -08:00
Eryu Guan
abbb536cc4
virtiofs: stop sandbox when virtiofsd quits
...
Commit 89e0dfae11 ("qemu: stop qemu process when virtiofsd quits")
stops sandbox when virtiofsd quits so that virtiofs mount inside guest
won't hang. But commit d5a3d0a61c ("virtiofs: use virtiofsd
--fd=FDNUM") deleted this monitor logic.
Add the Scanner back to monitor virtiofsd's stderr and stop sandbox if
Scanner returns error.
Note that we don't monitor the virtiofsd process itself is because
virtiofsd may be live-upgraded (when available) and the original
process may quit, but virtiofs service is still running.
Fixes : #2315
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com >
2019-12-04 19:54:41 +08:00
Ted Yu
9c0872dc7e
vc: Remove device when AddDevice encounters error
...
Fixes #2295
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-12-03 06:07:11 -08:00
Jose Carlos Venegas Munoz
d50eea66eb
Merge pull request #2274 from ericooper/ich-driver-002
...
Cloud Hypervisor: driver update number 2
2019-12-02 13:48:36 -06:00
Graham Whaley
1c27897ba2
Merge pull request #2300 from tedyu/map-ignored-mounts
...
vc: Use map to represent ignoredMounts
2019-12-02 16:41:48 +00:00
Eric Ernst
c384359209
Merge pull request #2278 from egernst/fc-comment
...
Fc comment
2019-12-02 07:53:27 -08:00
James O. D. Hunt
67f203f1b8
compatoci: Add a SetLogger call
...
Add a standard `SetLogger()` call to allow the `compatoci` package to be
provided a base logger which it can then customise.
Fixes : #2305 .
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com >
2019-12-02 10:10:37 +00:00
James O. D. Hunt
fc9114dbdc
Merge pull request #2298 from tedyu/mkdir-all-ret
...
vc: Check return value from os.MkdirAll in virtiofsdArgs
2019-12-02 09:43:21 +00:00
Peng Tao
0a5315b1c6
Merge pull request #2283 from tedyu/rm-pause-resume
...
vc: Drop Sandbox#Pause and Sandbox#Resume
2019-12-02 13:19:15 +08:00
Ted Yu
bec46bb59b
vc: Use map to represent ignoredMounts
...
We can use map from Source to Mount as ignoredMounts representation.
Inner loop in kataAgent#removeIgnoredOCIMount is removed.
Fixes #2299
Signed-off-by: Ted Yu yuzhihong@gmail.com
2019-11-30 12:36:27 -08:00
Ted Yu
628799a42f
vc: Check return value from os.MkdirAll in virtiofsdArgs
...
Fixes #2297
Signed-off-by: Ted Yu yuzhihong@gmail.com
2019-11-30 08:43:23 -08:00
Ted Yu
38224e8b7b
vc: Use map built-in accessor to find container in Sandbox#GetContainer
...
Fixes #2289
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-29 07:17:15 -08:00
Ted Yu
544730b4b1
vc: Drop Sandbox#Pause and Sandbox#Resume
...
Fixes #2276
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-29 05:58:06 -08:00
Johan Kuijpers
e8cc87b378
clh: basic/unit tests for clh driver
...
- added clh unit tests
- removed some inconsistencies in the cli builder to enable unit tests
- suppressed version check for in startSandbox to enable unit tests
- added clh related constants and methods to virtcontainer test
- small corrections after review applied
Fixes : #2205
Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com >
2019-11-28 10:27:37 +01:00
Eric Ernst
06971246ea
fc: update comments for startSandbox
...
The comment didn't reflect what the function does. Updated accordingly.
Fixes : #2277
Signed-off-by: Eric Ernst <eric.ernst@intel.com >
2019-11-26 15:25:51 -08:00
Archana Shinde
d054556f60
Merge pull request #2251 from devimc/topic/k8s/fixWrongNumberCPUs
...
k8s: fix wrong number cpus after killing a container
2019-11-26 10:12:36 -08:00
Archana Shinde
cc3506403b
Merge pull request #2220 from tedyu/new-mount-map
...
vc: Utilize map for newMounts to speed up replaceOCIMountSource
2019-11-26 09:10:25 -08:00
Johan Kuijpers
3ef8f6cf1b
clh: fixes erroneous killing of virtiofsd
...
remove type in kill statement for virtiofsd
Fixes : #2270
Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com >
2019-11-26 09:12:13 +01:00
Johan Kuijpers
6af127f7f9
clh: improve driver logging for failed hypervisor
...
added logging of stdout and stderr for failed hypervisor
Fixes : #2271
Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com >
2019-11-26 09:08:11 +01:00
Eric Ernst
552e9407b8
Merge pull request #2245 from tedyu/block-index-update
...
vc: Sandbox#getAndSetSandboxBlockIndex shouldn't alter BlockIndex in case of error
2019-11-25 13:19:06 -08:00
Julio Montes
b7731e97dd
virtcontainers: don't consider non-running container resources
...
Don't hot add again non-running container resources to avoid having extra
and useless resources
fixes #2186
Signed-off-by: Julio Montes <julio.montes@intel.com >
2019-11-25 18:42:34 +00:00
Julio Montes
43f051313e
virtcontainers: update resources after adding container to sandbox
...
Status of container should know prior to calculate the number of CPU
and memory
Signed-off-by: Julio Montes <julio.montes@intel.com >
2019-11-25 18:42:34 +00:00
Julio Montes
613fd0fb60
virtcontainers: rename GetOCISpec to GetPatchedOCISpec
...
GetOCISpec returns a patched version of the original OCI spec, it was modified
to support:
* capabilities
* Ephemeral storage
* k8s empty dir
In order to avoid consusions and make api clear, rename GetOCISpec
to GetPatchedOCISpec and ContainerConfig.Spec to ContainerConfig.CustomSpec
fixes #2252
Signed-off-by: Julio Montes <julio.montes@intel.com >
2019-11-25 17:22:23 +00:00
Julio Montes
dd15db3250
Merge pull request #2261 from teawater/fc_log_debug
...
fc.go: Set firecracker log level to debug if hypervisor.enable_debug …
2019-11-25 10:32:26 -06:00
Peng Tao
35d4cac999
Merge pull request #2257 from devimc/topic/virtcontainers/honourDontSaveSpec
...
virtcontainers: honour ContainerConfig struct comment and don't save OCI spec
2019-11-25 20:41:35 +08:00
Graham Whaley
6727c68005
Merge pull request #2255 from devimc/topic/virtcontainers/useMapSearch
...
virtcontainers: improve algorithm to find containers
2019-11-25 09:29:51 +00:00
Hui Zhu
191ee63750
fc.go: Set fc log level to debug if hypervisor.enable_debug is true
...
Set firecracker log level to debug if hypervisor.enable_debug is true.
Fixes : #2260
Signed-off-by: Hui Zhu <teawater@antfin.com >
2019-11-25 17:08:00 +08:00
Hui Zhu
562d9fd5c2
Merge pull request #2073 from Pennyzct/firecracker_fifo_log
...
FC: extract error info from firecracker built-in log and metrics scheme
2019-11-25 16:15:36 +08:00
Julio Montes
336edf75ea
virtcontainers: honour ContainerConfig struct comment and not save Spec
...
Currently kata-runtime saves the Container OCI Spec even when it's not needed
and a comment in `ContainerConfig struct` specifically indicates that
it won't be saved to disk.
Use '-' as json tag instead of '_' to indicates that `Spec` field shouldn't
be saved to disk.
fixes #2256
Signed-off-by: Julio Montes <julio.montes@intel.com >
2019-11-22 21:16:11 +00:00
Julio Montes
7f67b9f084
virtcontainers: improve algorithm to find containers
...
Do not iterate over a map to find a container, use map built-in
method instead.
fixes #2254
Signed-off-by: Julio Montes <julio.montes@intel.com >
2019-11-22 20:08:37 +00:00
Julio Montes
0ff0e54769
Merge pull request #2217 from ericooper/clh-driver-fix-2206
...
Clh driver: removed hard-coded vsock contextid (cid)
2019-11-22 07:23:14 -06:00
Johan Kuijpers
1abe52abd7
clh: removed hard-coded vsock contextid (cid)
...
update after review 2. applied ci static checks
Fixes : #2206
Signed-off-by: Johan Kuijpers <johan.kuijpers@ericsson.com >
2019-11-22 09:35:41 +01:00
Fupan Li
eae8449231
Merge pull request #2242 from tedyu/to-disk-close
...
vc: Persist file handle may leak in FS#ToDisk
2019-11-22 09:12:50 +08:00
Archana Shinde
db696da98b
Merge pull request #2232 from tedyu/rm-persist-dir
...
vc: Clean up directories in case MkdirAll fails
2019-11-21 15:42:23 -08:00
Ted Yu
c833ac2c53
vc: BlockIndex should not be altered in case of error
...
BlockIndex should not increment in case of error.
Similar issue applies to decrementSandboxBlockIndex where the symptom may be more severe - in worst case, the block index may become negative.
Fixes #2244
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-21 15:34:35 -08:00
Ted Yu
b8b6733f62
vc: Persist file handle may leak in FS#ToDisk
...
Fixes #2241
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-21 12:42:10 -08:00
Julio Montes
a17ca14c7a
Merge pull request #2238 from tedyu/start-sandbox-running
...
vc: Restore sandbox state when there is error starting containers
2019-11-21 13:58:56 -06:00
Ted Yu
03478d4540
vc: Clean up directories in case MkdirAll fails
...
Fixes #2230
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-21 02:27:30 -08:00
Ted Yu
93a03369ae
vc: Restore sandbox state when there is error starting containers
...
Fixes #2237
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-20 18:47:37 -08:00
Ted Yu
2331e879af
vc: Persist file handle may leak in FS#FromDisk
...
Fixes #2233
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-20 11:48:43 -08:00
Archana Shinde
1f71114291
Merge pull request #2223 from tedyu/sandbox-anno
...
vc: Sandbox#Annotations should use annotationsLock read lock
2019-11-20 11:11:31 -08:00
Fupan Li
48c8d669fe
Merge pull request #2179 from WeiZhang555/persist-storage
...
Support "Configuration" in "newstore" feature
2019-11-20 10:08:13 +08:00
Ted Yu
1afad1c0ad
vc: Sandbox#Annotations should use annotationsLock read lock
...
Fixes #2222
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-19 13:44:53 -08:00
Ted Yu
9a4ee4f205
vc: Utilize map for newMounts to speed up replaceOCIMountSource
...
Fixes #2212
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-19 07:47:02 -08:00
Ted Yu
618666ed8c
vc: Remove unnecessary call to kill
...
Fixes #2207
Signed-off-by: Ted Yu <yuzhihong@gmail.com >
2019-11-19 05:46:33 -08:00
Wei Zhang
7943dd95b4
persistence: store configuration in newstore
...
Fixes #803
Store the configuration data in persist.json.
Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com >
2019-11-19 18:40:19 +08:00
zhangwei_cs
c0d2867a0e
Merge pull request #2214 from bergwolf/fix-build
...
clh: fix build
2019-11-19 18:39:57 +08:00