Commit Graph

2252 Commits

Author SHA1 Message Date
Archana Shinde
aaa4e5c661
Merge pull request #2529 from likebreath/clh_remove_deadcode
clh: Remove dead-code on maxClhVcpus
2020-03-16 11:07:10 -07:00
Bo Chen
94298dd15c clh: Remove dead-code on maxClhVcpus
Our CLH driver in kata defines its own constant variable 'maxClhVcpus'
which can conflict with the maximum number of vCPUs specified from the
kata configuration file 'clh.config.DefaultMaxVCPUs'. As the value from
kata configuration file is preferred anyway and the code on 'maxClhVcpus'
is not being used. We'd better remove it for better readability and
avoiding further confusions.

Fixes: #2528

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-13 13:02:22 -07:00
GabyCT
ee01fa82b5
Merge pull request #2521 from grahamwhaley/20200310_shimv2_logs
README: logging: add shimv2 information
2020-03-12 09:02:23 -06:00
Julio Montes
511dc4a0e4
Merge pull request #2510 from awprice/issue-2467
vc: add agent.container_pipe_size annotation
2020-03-11 11:20:16 -06:00
Jose Carlos Venegas Munoz
aa40eeffe6
Merge pull request #2525 from jcvenegas/fix-ext2-warn
clh: set rootfstype
2020-03-11 08:57:46 -06:00
Jose Carlos Venegas Munoz
4ce44ab067 clh: set rootfstype
set rootfstype=ext4 to make kernel not do print errros like:

```
Mount option "data=ordered" incompatible with ext2
```

Depends-on: github.com/kata-containers/tests#2377

Fixes: #2524

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-03-11 12:49:13 +00:00
Alex Price
4c28717335 vc: add agent.container_pipe_size annotation
This adds the `agent.container_pipe_size` annotation which allows
configuration of the size of the pipes for stdout/stderr for containers
inside the guest.

fixes #2467

Signed-off-by: Alex Price <aprice@atlassian.com>
2020-03-11 21:04:26 +11:00
Fupan Li
5717da9262
Merge pull request #2523 from grahamwhaley/20200310_log_warn
logging: reduce default log level to Warn from Info
2020-03-11 09:23:44 +08:00
Graham Whaley
eee4d7012d katutils: logging: default log level to Warn
Set the katautils default log level to 'Warn', rather than 'Info',
as 'Info' is rather noisy.

Fixes: #2522

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 18:28:18 +00:00
Graham Whaley
913d1530fb cli: logging: Default to Warn level
Set the default log level explicitly to 'Warn', rather than taking
the logrus default (which is normally 'Info').

Fixes: #2522

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 18:28:18 +00:00
Graham Whaley
2cd0c88574 README: logging: add shimv2 information
The shimv2 runtime logs slightly differently - let's clarify
that in the existing OCI/CRI-O only runtime section.

Fixes: #2520

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2020-03-10 16:01:47 +00:00
Julio Montes
a5436627f5
Merge pull request #2517 from darfux/remove_ctr_share_dir_when_stop
vc: Remove container share dir when stopping
2020-03-10 08:10:44 -06:00
Li Yuxuan
ed43117554 vc: Remove container share dir when stopping
Remove the rootfs bind dest and finally remove the created share
directory when stopping the container.

Fixes #2516
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-03-10 01:12:30 +08:00
Jose Carlos Venegas Munoz
2656d1da22
Merge pull request #2509 from likebreath/hotplug_cpu
clh: enable CPU hotplug
2020-03-09 09:01:55 -06:00
Bo Chen
17b9de140f clh: enable CPU hotplug
With the HTTP API 'vm.resize()', the CPU hotplug with CLH is much simpler
comparing with QEMU. This is because we don't need to distinguish adding from
removing CPUs.

Fixes: #2495

Depends-on: github.com/kata-containers/packaging#968
Depends-on: github.com/kata-containers/tests#2364

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-06 11:26:58 -08:00
Jose Carlos Venegas Munoz
8cffbde514
Merge pull request #2507 from likebreath/fix-persist-clh
clh: add 'APIsocket' to persist HypervisorState
2020-03-04 16:45:09 -06:00
Bo Chen
63c7ac5bbe clh: add 'APIsocket' to persist HypervisorState
The 'apiSocket' member in the CloudHypervisorState struct needs to be kept
across different executions of kata-runtime with persist HypervisorState, so
that kata-runtime can talk with the same running cloud-hypervisor through
HTTP/REST API calls.

Fixes: #2506

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-03-04 09:15:36 -08:00
Julio Montes
83eef430bd
Merge pull request #2008 from darfux/use_block_index_map_instead
vc: Use BlockIndexMap instead of BlockIndex
2020-03-04 09:34:35 -06:00
Penny
e94cf0f135
Merge pull request #2454 from jcvenegas/fix-2453
vendor: update agent client
2020-03-03 17:11:17 +08:00
Penny
e0a4515609
Merge pull request #2458 from Pennyzct/netns_leak_on_crio
cri-o: fix netns mount point leaking from cri-o
2020-03-03 13:06:11 +08:00
Li Yuxuan
e9a46580b1 vc: Use BlockIndexMap instead of BlockIndex
This allows to reuse detached block index and ensures that the
index will not reach the limit of device(such as `maxSCSIDevices`)
after restarting containers many times in one pod.

Fixes: #2007
Signed-off-by: Li Yuxuan <liyuxuan04@baidu.com>
2020-03-03 10:30:18 +08:00
GabyCT
a1dcaac9ed
Merge pull request #2492 from jongwu/env
cli: add virtioFsDaemon to kata-env
2020-03-02 09:39:30 -06:00
Jianyong Wu
376c42523a cli: add virtioFsDaemon to kata-env.
virtiofsd should be added in kata-env as virtiofs enabled kata then
it will be easy to get the info of virtiofsd from kata-env.

Fixes: #2491
Change-Id: I37ff58ed4315344d1e2b87f3abcd04311661e910
Jira: ENTOS-1579
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2020-03-02 11:37:41 +08:00
Fupan Li
6bed2a724d
Merge pull request #2477 from bergwolf/ro
qemu: pass rootfs image in readonly mode
2020-02-26 19:22:13 +08:00
Fupan Li
fde6447c16
Merge pull request #2461 from Jimmy-Xu/support-lazy-attach-device
Fix rescan PCI conflicts with shpchp / pciehp
2020-02-26 17:49:35 +08:00
Peng Tao
171eb70564 qemu: use govmm vhost user device types directly
For one thing, we should not make kata's internal device type
exactly as govmm string by string.

For another thing, latest govmm changes the device driver strings
and it breaks kata in such a way but the fault is on kata side IMHO.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-02-26 00:33:55 -08:00
Jimmy Xu
c6cc8b93f9 virtcontainers: support lazy attach devices
- support attach large bar space vfio devices after create container

fixes #2460

Signed-off-by: Jimmy Xu <junming.xjm@antfin.com>
2020-02-26 11:56:07 +08:00
Peng Tao
46392945c6 qemu: pass guest image file readonly
So that we fobid guest from making changes to it.

Fixes: #2476
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-02-25 18:46:26 -08:00
Peng Tao
63fdf5328f vendor: update govmm dependency
To include block readonly capability. Included commits:

3700c55 qemu: add block device readonly support
88a25a2 Refactor code to support multiple virtio transports at runtime
2ee53b0 qemu: Don't set ".cache-size=" when CacheSize is 0

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-02-25 18:46:26 -08:00
Jose Carlos Venegas Munoz
7427fea864 dnm: vendor: update agent client
changes:
367b5296e protocols: client: Add timeout for hybrid vsock handshake

Fixes: #2453

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-02-25 21:16:32 +00:00
GabyCT
18b21eb6ca
Merge pull request #2490 from jcvenegas/fix-2489
clh: Fix version check
2020-02-25 14:53:58 -06:00
GabyCT
d9d4820684
Merge pull request #2441 from devimc/topic/virtcontainers/cgroupsV2
Implement cgroup manager
2020-02-21 15:01:39 -06:00
Xu Wang
e66dce1bc7
Merge pull request #2475 from bergwolf/umount
vc: do not follow symlink when umounting contanier host path
2020-02-21 18:09:32 +08:00
Julio Montes
ea82922a54 virtcontainers/pkg/cgroups: implement cgroup manager
cgroup manager is in charge to create and setup cgroups for
virtual containers, for example it adds /dev/kvm and
/dev/vhost-net to the list of cgroup devices in order to have
virtual containers working.

fixes #2438
fixes #2419

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-02-21 02:54:34 +00:00
Julio Montes
03cdf6c4a9 virtcontainers: add new package for cgroups
virtcontainers/pkg/cgroups contains functions and structures needed to deal
with cgroups and virtual containers

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-02-21 02:28:02 +00:00
Jose Carlos Venegas Munoz
d54723a5c4
Merge pull request #2487 from likebreath/update-clh-openapi-yaml
clh: update CLH to stable/v0.5.x
2020-02-20 15:19:28 -06:00
Jose Carlos Venegas Munoz
33459779c4 clh: update minimal supported version to check.
Kata now uses v0.5.0 and is not compatible with old versions.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-02-20 20:45:42 +00:00
Jose Carlos Venegas Munoz
20332298ab clh: Fix version check
Add support for new version format from clh.

Fixes: #2489

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-02-20 20:10:38 +00:00
Bo Chen
12d10eb2dc clh: Update clh driver to use the latest openAPI knobs
We leverage the new openAPI knobs from CLH to set readonly for disk image
and we also pass kernel cmd to set guest root filesystem readonly.

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-02-20 11:44:41 -08:00
Bo Chen
de8fe25dd5 clh: Update CLH to stable/v0.5.x
Use CLH branch stable/v0.5.x, and also re-generate the openAPI client
code with the new 'cloud-hypervisor.yaml'.

Fixes: #2488

Signed-off-by: Bo Chen <chen.bo@intel.com>
2020-02-20 11:44:33 -08:00
Julio Montes
feac6648fa
Merge pull request #2482 from jcvenegas/fix-2481
clh: Do not find vsock context ID
2020-02-20 08:20:39 -06:00
Penny Zheng
0da101055e version-update: version update for cri-o and k8s
cri-o v1.16.x has network namespace mount point leaking problem, and
the latest v1.17.x has fixed this problem.
since cri-o and k8s follow the same release cycle and deprecation policy,
I will also update k8s to the latest release v1.17.3-00 as well.

Fixes: #2457

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2020-02-20 21:40:20 +08:00
Peng Tao
5f9a77cccc vc: validate container path when cleaning up
A malicious can trick us with a crafted container
rootfs symlink and make runtime umount other mountpoints.
Make sure we do not walk through symlinks when umounting.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-02-19 19:14:06 -08:00
Archana Shinde
23625681d4
Merge pull request #2472 from amshinde/1.11.0-alpha0-branch-bump
# Kata Containers 1.11.0-alpha0
2020-02-19 18:37:17 -08:00
Jose Carlos Venegas Munoz
32196ff750 clh: Do not find vsock context ID
cloud-hypervisor uses `hybrid vsocks`, it is not needed to find a
context ID.

Fixes: #2481

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-02-19 22:32:40 +00:00
Archana Shinde
9f240b241a
Merge pull request #2480 from jcvenegas/fix-ldflags
makefile: Fix missing LDFLAGS references
2020-02-19 13:20:59 -08:00
Jose Carlos Venegas Munoz
db5cfebd09 makefile: Fix missing LDFLAGS references
KATA_LDFLAGS should be applied to all golang calls.

Fixes: #2478

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-02-19 19:53:59 +00:00
Salvador Fuentes
2c0e8ff499
Merge pull request #2479 from jcvenegas/fix-2478
makefile: do not use LDFLAGS for extra kata flags.
2020-02-19 12:15:53 -06:00
Jose Carlos Venegas Munoz
b74cda0243 makefile: do not use LDFLAGS for extra kata flags.
Some flags defined by the host may not be compatible with golang,
not use LDFLAGS but use our own variable.

Fixes: #2478

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2020-02-19 16:49:40 +00:00
Peng Tao
5bf3231213 vc: do not follow symlink when umounting contanier host path
So that if a guest changes it, we do not end up
propergating the error.

Fixes: #2474
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-02-19 05:37:41 -08:00