Commit Graph

4802 Commits

Author SHA1 Message Date
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
c5a3fa76be actions: Add job for building nemu
Add job for nemu to support generating tarballs for 1.9 stable
branch.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-26 13:16:22 -08:00
Archana Shinde
e005c37274 actions: Add job for building cloud-hypervisor
This will build and store the tarball for cloud-hypervisor.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-26 13:16:22 -08:00
Archana Shinde
29c2ff8476 release: Move bash from the actions to separate bash file
Try to move all the common bash logic from the actions toml file
to separate scripts and call these scripts instead.
Note the repo itself is now checked out to get access to
these scripts.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-26 13:16:22 -08:00
Archana Shinde
383e70344f actions: Add job to upload tarball to release page
Once kata-deploy completes successfully, this job will upload
kata static tarball to the release page using GIT_UPLOAD_TOKEN
secret.

Signed-off-by: Jose Carlos Venegas Munoz<jose.carlos.venegas.munoz@intel.com>
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-26 11:43:28 -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
Graham Whaley
1fd8ac65bf
Merge pull request #568 from shinebayar-g/fix/centos-docker-install
Fix centos docker installation docs.
2019-11-26 10:14:26 +00:00
Penny Zheng
837a0ee0ae cache-factory: set bridge info when creating vm
For now, we will encounter `failed to get available address from
bridges` error when launching kata containers from cache factory.
Although we've already passed bridges info to clients from cache factory
server, we still missed the setting part when creating vm.

Fixes: #2272

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-11-26 00:42:39 -08:00
Penny Zheng
3d8ffe4120 cache-factory: fix nil pointer runtime panic
For now, when we're using cache factory to launch kata containers,
we would encounter nil pointer runtime panic.

Fixes: #2272

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-11-26 00:42:12 -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
c58e6f973c kernel: update to 4.19.86
Fixes: #2193
Depends-on: github.com/kata-containers/packaging#807

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-11-25 14:10:11 -08:00
Eric Ernst
fd5549aa5f workflows: add release workflow
Many changes introduced by Archana Shinde.

This workflow will:
 1. get a list of artifacts from the packaging repo
 2. In parallel, build each of the applicable artifacts
 3. Consolidate the build artifacts from <2>
 4. Test the artifacts in a docker image on AKS
 5. Push the verified docker image to dockerhub

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-11-25 14:00:15 -08: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
Archana Shinde
545d61cbe8
Merge pull request #2253 from devimc/topic/virtcontainers/GetPatchedOCI
virtcontainers: rename GetOCISpec to GetPatchedOCISpec
2019-11-25 11:29:58 -08:00
GabyCT
d937c067f2
Merge pull request #2265 from jodh-intel/unbreak-tracing-test
tracing: Unbreak tracing test
2019-11-25 13:16:01 -06: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
James O. D. Hunt
330cc72ef3 tracing: Unbreak tracing test
Force Jaeger to log when it reports traces to ensure the tracing test
[1] works as expected.

Fixes: #2264.

[1] - https://github.com/kata-containers/tests/blob/master/tracing/tracing-test.sh

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-11-25 16:48:41 +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
Johan Kuijpers
7b8e15f3a7
Merge pull request #3 from kata-containers/master
Merge #3 of kata-containers/runtime
2019-11-25 09:37:27 +01: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
Yang Bo
b9158efe3a
Merge pull request #93 from lifupan/fix_copy_file
Fix copy file
2019-11-25 11:40:32 +08:00
lifupan
aeeb6fce73 grpc: fix the issue of wrong containers base dir
The base dir should be "/run/kata-containers" instead
of "/run/agent".

Fixes: #92

Signed-off-by: lifupan <lifupan@gmail.com>
2019-11-25 10:35:17 +08:00
lifupan
5f29f3e293 grpc: fix the issue of return ENOENT for chmod on a file/dir
When call "C" func directly, it's needed to change the string to
CString. To avoid using the unsafe calling, replace it with the
rust safe function to set mode for a file/dir.

Signed-off-by: lifupan <lifupan@gmail.com>
2019-11-25 10:21:07 +08:00
Fupan Li
f2e22eec4f
Merge pull request #89 from jiangliu/oci_v1
Minor improvement to agent/oci crate
2019-11-23 13:04:08 +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
0b3f5c7570
Merge pull request #822 from GabyCT/topic/addcifix
obs: Failed when we have unresolvable packages
2019-11-22 14:22:03 -06: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
Salvador Fuentes
fea166d8eb
Merge pull request #2250 from devimc/topic/gitignore/addClhToml
gitignore: include cloud hypervisor configuration toml
2019-11-22 11:33:34 -06:00
GabyCT
7938cd8965
Merge pull request #2208 from choury/patch-1
Respect containerd's debug config
2019-11-22 08:33:34 -06:00
Julio Montes
0ac43558c8 gitignore: include cloud hypervisor configuration toml
update .gitignore to include configuration-clh.toml to the list of
untracked files

fixes #2249

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-11-22 13:39:39 +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
James O. D. Hunt
a878afb7c3
Merge pull request #821 from GabyCT/topic/addubuntud
obs: Add fakeroot dependency for ubuntu 19.04
2019-11-22 11:41:52 +00:00
Liu Jiang
a47a94218f agent: rename SerializeError as Error
Rename SerializeError as Error and export it as the Error codes for
the OCI crate.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2019-11-22 18:08:56 +08:00
Liu Jiang
c34bdd06db agent: simplify implementation of oci/serialize
Simplify implementation of oci/serialize:
1) explicitly export pub members.
2) avoid unnecessary & and mut operators.
3) define Result to avoid duplicated code.

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2019-11-22 18:08:56 +08:00
Liu Jiang
b0edfc75ff agent: clean up clippy warnings about '`static'
warning: Constants have by default a `'static` lifetime
   --> src/lib.rs:254:26
    |
254 | pub const PIDNAMESPACE: &'static str = "pid";
    |                         -^^^^^^^---- help: consider removing `'static`: `&str`
    |
    = note: #[warn(clippy::const_static_lifetime)] on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime

Fixes: #90

Signed-off-by: Liu Jiang <gerry@linux.alibaba.com>
2019-11-22 16:48:47 +08: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
Gabriela Cervantes
0b9b7222e8 obs: Add fakeroot dependency for ubuntu 19.04
It seems that to build ksm-throttler, proxy, runtime and shim OBS packages
for ubuntu 19.04, we need fakeroot in order to have unresolvable OBS packages. This adds that dependency so we can build the packages.

Fixes #776

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-11-21 12:20:35 -06:00
Gabriela Cervantes
595606500b obs: Failed when we have unresolvable packages
We need to fail when we have unresolvable packages as they are not build
correctly.

Fixes #820

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-11-21 11:01:01 -06:00