Commit Graph

375 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
73cee17420
Merge pull request #312 from marcov/dracut
osbuilder: add dracut build method
2019-07-29 12:35:59 -05:00
Marco Vedovati
934422fc15 tests: fix background job failure detection
Distros with systemd / agent as init are not correctly enumerated.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-29 17:10:42 +02:00
Marco Vedovati
317bfba4b1 travis: use Ubuntu bionic distro version
Ubuntu bionic is a more recent LTS than trusty.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-29 17:10:42 +02:00
Marco Vedovati
a5a33436a6 ci: use .ci/setup.sh from tests repo
Use .ci/setup.sh from tests repo, to make sure spell check packages are
correctly installed for the OS under test.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-29 17:10:42 +02:00
Marco Vedovati
1e5746a4f2 tests: add dracut initrd and image tests
Build dracut initrd and images inside a reference container.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-29 17:10:42 +02:00
Marco Vedovati
2f55017fea osbuilder: add dracut build method
Add the option to build image and initrd using dracut.

Fixes: #311

Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-29 12:58:24 +02:00
Salvador Fuentes
28b0ed9209
Merge pull request #335 from Pennyzct/fedora_28_on_aarch64
fedora-rootfs: using fedora 28 on aarch64
2019-07-23 10:40:23 -05:00
Penny Zheng
9bfc083ef5 fedora-rootfs: using fedora 28 on aarch64
For some reason, busybox image crashed on fedora 30 rootfs on aarch64.
For now, we will switch back to use fedora 28.

Fixes: #334

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-07-23 17:43:38 +08:00
Marco Vedovati
8ebaac02d1 rootfs: move code from rootfs.sh to lib.sh
Move some of the functions in rootfs.sh (generate_dockerfile,
detect_go_version) in scripts/lib.sh, to make those functions reusable
outside of rootfs.sh.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-20 09:01:03 +02:00
Jose Carlos Venegas Munoz
cd9ab72636
Merge pull request #333 from egernst/1.9.0-alpha0-branch-bump
# Kata Containers 1.9.0-alpha0
2019-07-18 16:23:19 -05:00
Eric Ernst
bdbc806770 release: Kata Containers 1.9.0-alpha0
- rootfs: upgrade docker images for fedora
- rootfs: Make sure etc exists.

edb770e rootfs: upgrade docker images for fedora
27dddf0 rootfs: Make sure etc exists.

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-07-18 12:49:36 -07:00
James O. D. Hunt
fb454f87f7
Merge pull request #332 from jcvenegas/fedora-update
rootfs: upgrade docker images for fedora
2019-07-18 08:40:22 +01:00
Jose Carlos Venegas Munoz
edb770ee63 rootfs: upgrade docker images for fedora
Use fedora 30 in docker images.

Fixes: #331

Signed-off-by: Jose Carlos Venegas Munoz <jcvenega@jcvenega-nuc.zpn.intel.com>
2019-07-17 13:54:53 -05:00
Marco Vedovati
39370c2aea rootfs-builder: support provisioning existing rootfs
Add the use case of provisioning an existing rootfs directory with the
components / configurations needed to generate a Kata compatible images.
This supports use cases such as using a rootfs built outside of
osbuilder, and providing a overlay for dracut built initrds.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-07-17 19:47:14 +02:00
GabyCT
7d38b84203
Merge pull request #329 from amshinde/make-sure-etc-exists-for-chrony
rootfs: Make sure etc exists.
2019-07-16 16:38:56 -05:00
Jose Carlos Venegas Munoz
33434894ba
Merge pull request #325 from katabuilder/1.8.0-rc0-branch-bump
# Kata Containers 1.8.0-rc0
2019-07-03 08:46:10 -05:00
James O. D. Hunt
c74f9a2bfb
Merge pull request #327 from jcvenegas/fix-go-version-detect
rootfs: fix golang version detection
2019-07-03 08:41:01 +01:00
Jose Carlos Venegas Munoz
4ade7e5853 rootfs: fix golang version detection
When the rootfs creation is used for PRs there is
not a match with a kata runtime version, in this
case lets clone the runtime repository and checkout
to the kata branch target. If is already cloned
this mean this was set by depens-on script or the user.

Fixes: #326

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-07-02 18:05:10 -05:00
Archana Shinde
27dddf0a25 rootfs: Make sure etc exists.
We are seeing sporadic failures in the rootfs creation as listed here:
https://github.com/kata-containers/tests/issues/1744

While this cannot be reproduced locally, there is no reason
for the failure to write to $ROOTFS_DIR/etc/chrony.conf unless the upper
directories are missing as this file should be created if it did not
exist earier.
So just create the etc directory to test out if we see these sporadic
failures in the CI.

Fixes #328

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-07-02 12:02:54 -07:00
katacontainersbot
b199ae01b4 release: Kata Containers 1.8.0-rc0
- rootfs: configure chronyc service with makestep
- agent: detect required Go version from versions.yaml
- rootfs-builder: exclude unsupported archs from euleros and clearlinux
- tests: reduce the amount of log displayed
- chrony: Configure chrony to start only when /dev/ptp0 exists.
- rootfs: install systemd tmp.mount if needed

5a5ffa4 rootfs-builder: exclude unsupported archs from euleros
7dc15c2 rootfs-builder: exclude unsupported archs from clearlinux
d2e80f5 chrony: Configure chrony to start only when /dev/ptp0 exists.
6969c7f rootfs: install systemd tmp.mount if needed
add0d44 rootfs: configure chronyc service with makestep
cc5df05 travis: do not set -x when running test
25d75e5 tests: reduce the amount of log displayed
acc9c7f tests: identify the distros with build failures
68f2090 make: add ability to silent recipe commands with chronic
cbb8c01 make: add print-% target printing variable value
e770e2a rootfs: enforce minimum Go version when building locally
92b42c7 agent: detect required Go version from versions.yaml

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-07-01 19:37:39 +00:00
James O. D. Hunt
0c48630395
Merge pull request #318 from xs3c/chronyc-with-makestep
rootfs: configure chronyc service with makestep
2019-06-25 07:49:37 +01:00
James O. D. Hunt
a84fcf296d
Merge pull request #292 from marcov/versions.yaml
agent: detect required Go version from versions.yaml
2019-06-24 17:12:24 +01:00
Marco Vedovati
5318edb8f2
Merge pull request #321 from Pennyzct/exclude_aarch64_from_clearlinux_and_euleros
rootfs-builder: exclude unsupported archs from euleros and clearlinux
2019-06-24 14:58:19 +02:00
Penny Zheng
5a5ffa4493 rootfs-builder: exclude unsupported archs from euleros
For euleros, it has supported aarch64 starting from v2.3,
but here is the sad part, there existed bugs in their 2.3.x image,
this bug existed in both x86_64 and aarch64 image.
related issue euleros/euleros-docker-images/#13
(https://github.com/euleros/euleros-docker-images/issues/13) has been raised.

Fixes: #320

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-06-24 17:01:18 +08:00
Penny Zheng
7dc15c28f8 rootfs-builder: exclude unsupported archs from clearlinux
For clearlinux, for now, it is only designed for amd64.

Fixes: #320

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-06-24 17:01:07 +08:00
James O. D. Hunt
a118a60efc
Merge pull request #314 from marcov/silent-logs
tests: reduce the amount of log displayed
2019-06-24 08:27:39 +01:00
Jose Carlos Venegas Munoz
0e0e74b8bb
Merge pull request #265 from amshinde/configure-chrony-systemd
chrony: Configure chrony to start only when /dev/ptp0 exists.
2019-06-21 11:20:31 -05:00
Archana Shinde
d2e80f54b1 chrony: Configure chrony to start only when /dev/ptp0 exists.
Hypercall to implement virtual PTP was introduced in kernel 4.10
Have chrony run only if the device created by kvm-ptp exists.
Add this as a ConditionExists in the systemd service file.

This service if named as chrony.service in deb based distributions
rather than chronyd.service, although a systemd alias exists.
However it is not possible to come up with a generic `PATH` systemd
unit relying on the alias.

Fixes #308

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-06-20 15:29:07 -07:00
Jose Carlos Venegas Munoz
434418c27b
Merge pull request #319 from marcov/debian-tmp.mount
rootfs: install systemd tmp.mount if needed
2019-06-20 14:57:57 -05:00
Marco Vedovati
6969c7fc18 rootfs: install systemd tmp.mount if needed
On some distros (Debian, Ubuntu, openSUSE), tmp.mount is not
installed by default in /[etc|usr/lib]/systemd/system, but
just in /usr/shared/systemd, so it needs to be manually copied
there to have /tmp mounted as tmpfs.

Fixes: #317

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-20 17:30:50 +02:00
Yang, Wei
add0d445e8 rootfs: configure chronyc service with makestep
The current chrony service does not step the system clock,
so add the modification to do this if the adjustment is
larger than one second

Fixes: #316

Signed-off-by: Yang, Wei <wei.yang1@linux.alibaba.com>
2019-06-20 18:26:37 +08:00
Xu Wang
d9782606bb
Merge pull request #313 from bergwolf/1.8.0-alpha2-branch-bump
# Kata Containers 1.8.0-alpha2
2019-06-19 15:09:50 +08:00
Marco Vedovati
cc5df055bc travis: do not set -x when running test
Do not `set -x` when running tests with Travis: tests are alreadyu doing
it, and with chronic logs are shown only if the commands executed fails.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-18 18:23:13 +02:00
Marco Vedovati
25d75e5b1c tests: reduce the amount of log displayed
Reduce the amount of logs displayed when running test. This is achieved
calling commands using chronic, and printing extra information about
the Kata / Docker configuration only if a test fails to start a
container.

Fixes: #145

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-18 18:23:13 +02:00
Marco Vedovati
acc9c7fe0d tests: identify the distros with build failures
Make more obvious what distros failed to build printing out for each
distro the success / failure build state.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-18 16:24:09 +02:00
Marco Vedovati
68f2090bab make: add ability to silent recipe commands with chronic
Add the ability to silent recipe commands with chronic.
When OSBUILDER_USE_CHRONIC is set, the target recipe command is run
using chronic, and the output is muted unless the command fails.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-18 13:36:03 +02:00
Marco Vedovati
cbb8c01412 make: add print-% target printing variable value
Add a print-% make target, to be able to retrieve the value of make
variables.
E.g. "make print-MY_MAKE_VAR MY_MAKE_VAR=1" will print "1"

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-18 13:25:27 +02:00
Peng Tao
840778788c release: Kata Containers 1.8.0-alpha2
- docs: Fix typo

7437ce8 docs: Fix typo

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-06-17 16:31:20 +08:00
Graham Whaley
3718af5f9f
Merge pull request #310 from jodh-intel/fix-typo
docs: Fix typo
2019-06-13 10:52:24 +01:00
James O. D. Hunt
7437ce8442 docs: Fix typo
Correct a spelling mistake.

Fixes: #309.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-06-13 10:04:28 +01:00
Ganesh Maharaj Mahalingam
07146a0934
Merge pull request #307 from katabuilder/1.8.0-alpha1-branch-bump
# Kata Containers 1.8.0-alpha1
2019-06-11 14:32:34 -07:00
katacontainersbot
3f45d5e17e release: Kata Containers 1.8.0-alpha1
Version bump no changes

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-06-10 20:56:15 +00:00
Ganesh Maharaj Mahalingam
a1581e3c67
Merge pull request #306 from katabuilder/1.8.0-alpha0-branch-bump
# Kata Containers 1.8.0-alpha0
2019-06-05 18:50:35 -07:00
katacontainersbot
8c51e4d916 release: Kata Containers 1.8.0-alpha0
- clear: Add util-linux-bin package to Clearlinux rootfs
- tmp: Do not remove tmp.mount unit file from the rootfs
- docs: Fix spelling and formatting
- image-builder: create /etc/machine-id
- rootfs-builder: fix chrony service
- rootfs: Don't hardcode alpine version for golang images
- image-builder/boot time: remove unneeded systemd units and files

adee8b0 clear: Add util-linux-bin package to Clearlinux rootfs
6f294f4 tmp: Do not remove tmp.mount unit file from the rootfs
1453471 docs: Fix spelling and formatting
a438d08 image-builder: create /etc/machine-id
456be67 rootfs-builder: fix chrony service
d8c5706 rootfs: Don't hardcode alpine version for golang images
02b3b3b image-builder: remove unneeded systemd units and files

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-06-05 19:15:58 +00:00
Marco Vedovati
e770e2ad1b rootfs: enforce minimum Go version when building locally
When building locally (without Docker), the Go version installed on the
system, needed to build the agent, must satisfy the minimum Go version
requirement specified in runtime/versions.yaml.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-05 11:02:57 +02:00
Marco Vedovati
92b42c7f6d agent: detect required Go version from versions.yaml
Detect the Go version required to build the agent from the versions.yaml
file in the runtime repository.

Fixes: #291

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-06-05 11:02:57 +02:00
GabyCT
2f22a5681d
Merge pull request #303 from amshinde/add-util-linux-bin
clear: Add util-linux-bin package to Clearlinux rootfs
2019-06-03 09:45:31 -05:00
Archana Shinde
adee8b0e35 clear: Add util-linux-bin package to Clearlinux rootfs
This package contains mount command among several other commands.
Unlike other distros, this package is not auto-pulled with systemd.
Add this package explicitly.

Fixes #302

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-05-31 14:35:20 -07:00
Julio Montes
030cd4d41f
Merge pull request #301 from amshinde/retain-tmp-mount-unit
tmp: Do not remove tmp.mount unit file from the rootfs
2019-05-31 11:40:52 -05:00
Archana Shinde
6f294f43d4 tmp: Do not remove tmp.mount unit file from the rootfs
We should start this unit so that systemd can mount /tmp as
tmpfs.

Fixes #300

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-05-30 15:12:05 -07:00