Commit Graph

11620 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
75f4338350 release: 1.6.0
Version bump to kata 1.6.0.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-03-21 13:00:15 -06:00
James O. D. Hunt
e1eb28836a
Merge pull request #249 from GabyCT/topic/modifytest
test: Modify test_images script to handle FC
2019-03-21 17:04:32 +00:00
GabyCT
2069a3d953
Merge pull request #406 from teawater/vmcache_vsock
howto: Remove vsock from VMCache howto
2019-03-21 10:06:38 -06:00
Julio Montes
a7ccc24c80
Merge pull request #1398 from teawater/curl
ci: check curl before use it
2019-03-21 08:17:38 -06:00
James O. D. Hunt
5d761cec76 scripts: Handle images with a DAX/NVDIMM header
osbuilder recently added the ability to create images with a DAX/NVDIMM
header [1], however this change broke the data collection script. Update
that script to handle images with and without this header.

The data collection script will now assume a header is present. However,
if it fails to find the required partition data, it will try again, this
time assuming the image does not have a DAX/NVDIMM header.

Fixes #1404.

[1] - https://github.com/kata-containers/osbuilder/pull/236

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-21 12:35:28 +00:00
James O. D. Hunt
bdf6b2d49d scripts: Handle missing partitions in collect script
Add an extra check in the data collection script to ensure partitions
are found in the image.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-21 12:28:58 +00:00
James O. D. Hunt
ad228e3c3b build: Add missing targets to show-usage
Add a number of useful build and install targets to the `show-usage`
target which are visible when the user runs `make help`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-21 11:30:19 +00:00
James O. D. Hunt
e6a7091981 build: Allow runtime to be built+installed without shim
Add `install-runtime` and `install-netmon` targets. This allows the
`install` target to be simplified and also allows the runtime to be
built without having to build the `containerd-shim-v2` binary which is
slow to build:

```
$ make runtime && sudo -E PATH=$PATH make install-runtime
```

Fixes #1402.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-21 11:30:12 +00:00
James O. D. Hunt
206ffc66aa build: Don't build the runtime when building shim binary
The `containerd-shim-v2` binary does not need the `kata-runtime` binary
to be built first, so remove the dependency.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-21 11:30:07 +00:00
Graham Whaley
c70ba4844f
Merge pull request #1390 from devimc/topic/roFS
virtcontainers: improve security and mount the rootfs as read-only fs
2019-03-21 09:33:04 +00:00
Hui Zhu
c3f082ccb8 howto: Remove vsock from VMCache howto
Remove vsock from VMCache howto because VMCache can work with vsock now.

Fixes: #405

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-21 17:24:57 +08:00
Hui Zhu
639e8271de config: Make VMCache can work with vsock
After code check and test, found VMCache can work with vsock.
Remove the code that prohibit them from working together.

Fixes: #1400

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-21 17:13:03 +08:00
Hui Zhu
aec0d263fa ci: check curl before use it
install-yq.sh use curl but not check if curl is available or not.
Add code to check curl before use it.

Fixes: #1379

Signed-off-by: Hui Zhu <teawater@hyper.sh>
2019-03-21 10:52:33 +08:00
Archana Shinde
e16ff37f86 chrony: Comment out any NTP sources for chrony
Reference:  https://chrony.tuxfamily.org/doc/3.4/chrony.conf.html

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-20 16:05:33 -07:00
Archana Shinde
3df19ff984 chrony: Add virtual PTP as source for chrony
KVM virtual PTP in linux kernel allows guest to sync its
clock to the host clock with high precision. kvm-ptp has been
enabled in our kernel. Add this as a source for `chrony` so that
it can be used to sync the guest system clock.
`chrony` needs to be started in the guest for time sync.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-20 14:05:42 -07:00
Julio Montes
8c2190d3a3
Merge pull request #400 from Pennyzct/snap_aarch64
snap-aarch64: modify qemu-related info for arm64
2019-03-20 09:22:07 -06:00
Sebastien Boeuf
f1ef63e5c6
Merge pull request #1394 from WeiZhang555/improve-readability
refactor: improve readability of `bumpAttachCount`
2019-03-20 08:13:45 -07:00
Julio Montes
9b73900ba6 katautils: mask systemd-random-seed
systemd-random-seed service fails if the rootfs is a read-only fs.
systemd-random-seed restores the random seed of the system at early
boot and saves it at shutdown, since kata containers are one boot machines
this service is not needed.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-20 09:02:20 -06:00
Julio Montes
64984667ad virtcontainers: improve security and mount the rootfs as read-only fs
Mounting the rootfs as read-only fs the binaries can't be modified.

fixes #1389

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-20 07:50:20 -06:00
Wei Zhang
26a9b72c34 refactor: improve readability of bumpAttachCount
Fixes #1392

Improve code readability of function `device.bumpAttachCount`

Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
2019-03-20 11:38:49 +08:00
Penny Zheng
ddf638ba86 snap-aarch64: modify qemu-related info for arm64
Former snap configuration snapcraft.toml install qemu-lite for all
platforms, which isn't applicable on aarch64. We need qemu-aarch64
of specific version and extra patches.

Fixes: #399

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-03-20 11:08:15 +08:00
Matt Fischer
ad5d879f8c rootfs: Print attempt number after max check
With the old code it was possible to see odd messages like:
"INFO: Create root disk image. Attempt 6 out of 5."

Move the attempt number print to after we check against the max

Fixes #251

Signed-off-by: Matt Fischer <matt@mattfischer.com>
2019-03-19 21:04:40 -06:00
Archana Shinde
8fe64058aa rootfs: Include chrony in the Dockerfile images
Add chrony to distro Dockerfile.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-19 14:34:14 -07:00
Archana Shinde
0b33519709 rootfs: add PACKAGE var to debian config
debian config seems to be missing PACKAGE variable altogether.
Add it along with appending chrony to the list.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-19 14:30:10 -07:00
Archana Shinde
510ddd28c8 rootfs: Add chrony service to rootfs
chrony will be used to schronize guest clock with host
using kvm_ptp kernel driver.
This does add another active component to the rootfs
but keeping time scychorized is crucial.

Fixes #255

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-19 14:12:21 -07:00
Gabriela Cervantes
523405e62d test: Modify test_images script to handle FC
We need to modify this test in order to handle firecracker.

Fixes #248

Depends-on:github.com/kata-containers/osbuilder#247

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-03-19 13:42:00 -06:00
Jose Carlos Venegas Munoz
d67aad893f
Merge pull request #247 from devimc/topic/fixFCNoDax
image-builder: make DAX support optional
2019-03-19 11:51:19 -06:00
Archana Shinde
93e59021b9
Merge pull request #404 from jodh-intel/unbreak-debug-console-instructions
Unbreak debug console instructions
2019-03-19 09:45:58 -07:00
Julio Montes
8e72cf15e6
Merge pull request #1381 from alicefr/bridges_func
s390x: add bridges function
2019-03-19 10:38:38 -06:00
Julio Montes
dbc5a32b74
Merge pull request #1366 from devimc/topic/fixRelativeCgroupPath
virtcontainers: honor OCI cgroupsPath
2019-03-19 10:32:41 -06:00
Julio Montes
6217689cc0
Merge pull request #253 from bergwolf/1.6.0-rc2-branch-bump
# Kata Containers 1.6.0-rc2
2019-03-19 09:50:19 -06:00
Julio Montes
b39d0ced69
Merge pull request #1383 from bergwolf/1.6.0-rc2-branch-bump
# Kata Containers 1.6.0-rc2
2019-03-19 09:49:54 -06:00
James O. D. Hunt
5a271f06ce scripts: Allow data collection script output to be hidden
Use a clever HTML trick to allow the output of the data collection
script to be hidden / unhidden in the github.com interface.

See the example at the top of
https://github.com/kata-containers/runtime/issues/1347.

Fixes #1386.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-19 15:29:13 +00:00
James O. D. Hunt
4f34a54777 scripts: Refactor collect script
Create a new function to collect all data display function calls in the
data collection script.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-19 15:28:14 +00:00
James O. D. Hunt
b347b3302c docs: Don't modify pristine config files
Kata supports multiple configuration file locations, so update the dev
guide to tweak config settings in
`/etc/kata-containers/configuration.toml` rather than the pristine
`/usr/share/defaults/kata-containers/configuration.toml` file. The
former is read first meaning the system can be reset to a vanilla Kata
configuration by simply deleting
`/etc/kata-containers/configuration.toml`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-19 11:29:58 +00:00
James O. D. Hunt
c771f76eae docs: Unbreak debug console instructions
The debug console systemd job needs to specify `PrivateDevices=no` to
ensure the job can access the *real* console. Without this, connecting
to the socket does not provide access to the main guest root context.

Fixes #403.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-03-19 11:23:24 +00:00
Graham Whaley
ea24ff318a
Merge pull request #402 from ttx/packagecloud
Credit packagecloud for package hosting
2019-03-19 10:53:42 +00:00
Xu Wang
441c51c22c
Merge pull request #402 from amshinde/add-links-to-docs
Add links to all how-to and use-case docs in README.md
2019-03-19 16:18:16 +08:00
Archana Shinde
534ac218c7 docs: Add links to use-case documents.
Fixes #401

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-18 11:35:33 -07:00
Archana Shinde
e02829b443 docs: Add link for VM templating and VM cache
Add links for these docs in REAME.md

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-18 11:30:35 -07:00
Peng Tao
6570944b67 release: Kata Containers 1.6.0-rc2
- image-builder: fill out device namespace information into kata image
- tests: install kata components from master
- tests: skip euleros
- arch: Remove calls to arch command
- pullapprove: remove it
- memory_hotplug: MEM_BOUNDARY_MB should be arch-dependent

726f798 image-builder: fill out device namespace information into kata image
cbe5642 image-builder: add gcc as dependecy to generate the image
7620066 image-builder: sync rootfs data after copying it into the image
dc5bc07 image-builder: fix mem boundary recalculation
71ccc0a mage-builder: remove -s option and IMG_SIZE envar
8065bb6 rootfs-builder: delete dnf and rmp data
35588dd tests: install kata containers components from master
519bbe8 tests: remove docker before installing the newer version
b4de168 tests: skip euleros
f38c67d arch: Remove calls to arch command
8963b8e pullapprove: remove it
e4d5c1b memory_hotplug: MEM_BOUNDARY_MB should be arch-dependent

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2019-03-18 22:14:31 +08:00
Peng Tao
70d8b167e7 release: Kata Containers 1.6.0-rc2
- volumes: Handle k8s empty-dirs of "default" medium type
- versions: kernel: update to 4.19.28
- qemu: throw error when fail to get addr from bridges
- vc:qemu: Fix id calculation of memory hotplug
- s390x: 2 small test fixes
- arm64: support NVDIMM
- virtcontainers: move resource calculation to its own function
- versions: update nemu to latest release
- Add crio and containerd details to collect script
- pkg: reduce memory footprint
- Fix rootfs mount assumptions
- s390x: fix golint complain
- Network: remove Physical field in VethEndpoint
- test: add tests for sandbox creation rollback and cleanup
- VMCache: the new function that creates VMs as caches before using it
- unit test: Fix local test
- Add upstream version url regexp's to allow upto date checks
- virtcontainer: watch the qemu's console when proxy's debug enabled
- unit-test: fix undefined struct field SupportVSocks on arm64
- Makefile: Fix aarch64 fail in No GO command or GOPATH not set mode
- tracing: Fix tracing
- config: check the builtIn first when updating shim/proxy/agent
- qemu: fix devID value error
- Makefile: Change "GOPATH not set" to "No GO command"

8e2a5ea tests: Fix units tests to check empty-dir volumes backed by host-dir
47a6023 volumes: Handle k8s empty-dirs of "default" medium type
4e81522 vc:qemu: Fix id calculation of memory hotplug
502fdab test: add test for addDeviceToBridge
0061e16 virtcontainers: move resource calculation to its own function
7504d9e unit-test: add TestSandboxUpdateResources
f009a53 versions: update nemu to latest release
f2a506a scripts: Add containerd details to collect script
7266d31 scripts: Log crio config file in collect script
30f9776 scripts: Create separate section for crio in collect script
ae08ea3 scripts: Add helper function to collect script
ae4d8b4 versions: kernel: update to 4.19.28
c7ace4b qemu: throw error when fail to get addr from bridges
2456ac5 pkg: reduce memory footprint
df9a401 Network: remove Physical field in VethEndpoint
76d9db3 vendor: Add github.com/gogo/protobuf
45fe870 runtime: Add unit tests
0f8b2ad VMCache: Update factory to run as a VMCache server
90704c8 VMCache: the core and the client
d8bcddb qemu-arm64: add unit test for func appendImage on aarch64
986e4dc qemu-arm64: Support nvdimm on arm64
8ba27e1 s390x: remove pmu from test
6242af3 s390x: fix TestQemuS390xMemoryTopology
613edd5 s390x: fix golint complain
27a92f9 runtime: Fix rootfs mount assumptions
c964a26 virtcontainers: makefile fix .ci path
fcee080 unit-test: Fix local test
c4957dd virtcontainer: watch the qemu's console when proxy's debug enabled
1e30673 test: add tests for sandbox creation rollback and cleanup
bdb34e7 Makefile: Fix aarch64 fail in No GO command or GOPATH not set mode
c759cf5 tracing: Fix tracing
31232b4 config: check the builtIn first when updating shim/proxy/agent
03dd780 qemu: fix devID value error
a1ddf53 Makefile: Change "GOPATH not set" to "No GO command or GOPATH not set"
35672b5 unit-test: fix undefined struct field SupportVSocks on arm64
975157d versions.yaml: add uscan annotations

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2019-03-18 22:13:32 +08:00
Alice Frosi
6a95ad2ca9 s390x: add bridges function
The bridges function was missing for s390x

Fixes: #1380

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2019-03-18 14:57:58 +01:00
Peng Tao
925122a411
Merge pull request #1374 from amshinde/k8s-empty-dir
volumes: Handle k8s empty-dirs of "default" medium type
2019-03-18 12:53:35 +08:00
Julio Montes
02fa22bbdd image-builder: make DAX support optional
Not all hypervisor support NVDIMM hence DAX support MUST BE enabled explicitly
setting the DAX environment variable to 'yes'

fixes #246

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-15 13:14:52 -06:00
Archana Shinde
8e2a5eaa36 tests: Fix units tests to check empty-dir volumes backed by host-dir
Test verify that k8s volumes that are mounted as tmpfs are considered as
ephemeral.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-15 11:02:17 -07:00
James O. D. Hunt
e84c62c960
Merge pull request #386 from amshinde/check-crio-runtime-config
kata-deploy: Add runtime config for crio if it does not exist
2019-03-15 17:43:08 +00:00
Sebastien Boeuf
4d65fb4ec4
Merge pull request #398 from amshinde/sysctl-docs
sysctsl: Add how-to doc for setting sysctls.
2019-03-15 10:18:28 -07:00
Archana Shinde
47a6023382 volumes: Handle k8s empty-dirs of "default" medium type
We were considering all empty-dir k8s volumes as backed by tmpfs.
However they can be backed by a host directory as well.
Pass those as 9p volumes, while tmpfs volumes are handled as before,
namely creating a tmpfs directory inside the guest.
The only way to detect "Memory" empty-dirs is to actually check if the
volume is mounted as a tmpfs mount, since any information of k8s
"medium" is lost at the OCI layer.

Fixes #1341

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-03-15 09:44:10 -07:00
Thierry Carrez
4f4cfb99f7 Credit packagecloud for package hosting
We use a packagecloud OSS account for package hosting.
As part of the arrangement with packagecloud we need to
credit them and add a link back to https://packagecloud.io
on our website and project README.

This was added to the kata-containers repository's README,
but it is also probably appropriate to add it to the packaging
README as well.

Signed-off-by: Thierry Carrez <thierry@openstack.org>
2019-03-15 15:13:37 +01:00