Commit Graph

399 Commits

Author SHA1 Message Date
Eric Ernst
4287ba639b release: Kata Containers 1.9.0-alpha2
- dracut: increase base.conf priority from 00 to 05
- make: use bash to fetch dracut conf 'drivers' list

dec8013 make: use bash to fetch dracut conf 'drivers' list
6daec98 make: Move comment about dracut --no-kernel
2950b37 dracut: increase base.conf priority from 00 to 05

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-09-16 11:31:43 -07:00
GabyCT
83b89d8773
Merge pull request #355 from crobinso/dracut-conf-priority
dracut: increase base.conf priority from 00 to 05
2019-09-11 09:59:16 -05:00
GabyCT
c8e6054843
Merge pull request #357 from crobinso/dracut-drivers-parse
make: use bash to fetch dracut conf 'drivers' list
2019-09-10 09:10:30 -05:00
Cole Robinson
dec8013748 make: use bash to fetch dracut conf 'drivers' list
dracut will process conf files with bash, and in fact it's common to
use idioms like += in conf files for string concatenation. The current
grep usage in the Makefile won't catch all possible valid 'drivers'
variable cases.

Instead, use bash to parse and echo the 'drivers' content

Fixes: #356

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-09 13:17:58 -04:00
Cole Robinson
6daec98aaf make: Move comment about dracut --no-kernel
The current placement is confusing IMO, let's move it close to the
code it's describing

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-09 13:17:58 -04:00
Cole Robinson
2950b37028 dracut: increase base.conf priority from 00 to 05
The Makefile invokes dracut with a custom confdir. However dracut will
still pull site configuration from /usr/lib/dracut/dracut.conf.d/, which
on Fedora contains a 01-dist.conf that sets among other things
early_microcode="yes".

Because 01-dist.conf is processed after 00-base.conf, kata's
early_microcode="no" is overridden, which isn't intended.

Rename 00-base.conf to 05-base.conf to sidestep this

Fixes: #354

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-09-09 12:44:29 -04:00
Eric Ernst
48540146b6
Merge pull request #351 from katabuilder/1.9.0-alpha1-branch-bump
# Kata Containers 1.9.0-alpha1
2019-09-06 10:55:46 -07:00
Salvador Fuentes
2b785044a2 ci: travis: allow failures on ppc64le
travis ppc64le has been very unstable when running
apt-get commands and are not allowing us to run the
job successfully.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-09-06 09:19:12 -05:00
katacontainersbot
f9cfa172ab release: Kata Containers 1.9.0-alpha1
- image_builder: create /etc/resolv.conf
- Add kmod package
- dracut: improve host distro support
- Allow to override build date with SOURCE_DATE_EPOCH
- image-builder: check /sbin/init when AGENT_INIT=yes
- chrony-service: re-patch PR#265
- image-builder: get mount directory size with Mb format
- osbuilder: add dracut build method
- fedora-rootfs: using fedora 28 on aarch64

862b077 image_builder: create /etc/resolv.conf
ce20d72 dracut: improve host distro support
495a92d rootfs-builder: add kmod package
87af599 rootfs-builder/clearlinux: reduce image size when AGENT_INIT=yes
dacd2d3 scripts/lib: Allow to override build date
9afe931 chrony-service: re-patch PR#265
b1b8ce4 image-builder: check /sbin/init when AGENT_INIT=yes
934422f tests: fix background job failure detection
317bfba travis: use Ubuntu bionic distro version
a5a3343 ci: use .ci/setup.sh from tests repo
1e5746a tests: add dracut initrd and image tests
6d5aef5 osbuilder: Get mount directory size with Mb format
2f55017 osbuilder: add dracut build method
9bfc083 fedora-rootfs: using fedora 28 on aarch64
8ebaac0 rootfs: move code from rootfs.sh to lib.sh
39370c2 rootfs-builder: support provisioning existing rootfs

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-09-03 17:34:10 +00:00
Peng Tao
64caa3f4d3
Merge pull request #346 from nitkon/master
image_builder: create /etc/resolv.conf
2019-08-22 14:39:34 +08:00
Nitesh Konkar
862b077598 image_builder: create /etc/resolv.conf
Since the image rootfs is readonly, we
create an empty /etc/resolv.conf which
the agent would later bind-remount as
read-write.

Fixes: #345

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-08-12 19:15:32 +05:30
GabyCT
88f8216978
Merge pull request #342 from devimc/topic/rootfs/kmod
Add kmod package
2019-08-09 14:05:45 -05:00
Julio Montes
987fe3067e
Merge pull request #344 from marcov/dracut-improvements
dracut: improve host distro support
2019-08-09 11:39:23 -05:00
Julio Montes
7412b98774
Merge pull request #340 from bmwiedemann/date
Allow to override build date with SOURCE_DATE_EPOCH
2019-08-09 08:39:27 -05:00
Marco Vedovati
ce20d72593 dracut: improve host distro support
Detecting the host distro allows the rootfs setup to be correctly
carried out.

Fixes: #343

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-09 15:35:08 +02:00
Julio Montes
495a92d2c3 rootfs-builder: add kmod package
Support for loading kernel modules got merged. kmod package is needed for
loading kernel modules in the guest.

fixes #341

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-08 20:28:59 +00:00
Julio Montes
87af599dd0 rootfs-builder/clearlinux: reduce image size when AGENT_INIT=yes
Don't install chrony, iptables-bin and util-linux-bin when AGENT_INIT=yes,
these packages are only needed when the init process is systemd.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-08 20:12:03 +00:00
Bernhard M. Wiedemann
dacd2d34b9 scripts/lib: Allow to override build date
Allow to override build date with SOURCE_DATE_EPOCH
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Also use UTC to be independent of timezone.

This date call only works with GNU date.

Without this patch, kata-containers-initrd.img contained
varying var/lib/osbuilder/osbuilder.yaml with
   version: "1.9.0-alpha0"
   -rootfs-creation-time: "2019-08-06T18:40:27.402493939+0000Z"
   +rootfs-creation-time: "2034-09-08T07:57:34.386990704+0000Z"

Fixes #340

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
2019-08-08 16:37:22 +02:00
Salvador Fuentes
269d31a9ac
Merge pull request #337 from devimc/topic/image-builder/fixMissingAgent
image-builder: check /sbin/init when AGENT_INIT=yes
2019-08-02 09:46:29 -05:00
Archana Shinde
dd40af2557
Merge pull request #339 from Pennyzct/chrony_only_on_x86-64
chrony-service: re-patch PR#265
2019-08-01 12:24:54 -07:00
Penny Zheng
9afe9310b1 chrony-service: re-patch PR#265
commit 39370c2(https://github.com/kata-containers/osbuilder/commit/
39370c2aea) has accidentally deleted the
content in PR#265(https://github.com/kata-containers/osbuilder/pull/265).
Here, I just re-patch PR#265 on the latest master code.

Fixes: #338

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-08-01 15:48:46 +08:00
Julio Montes
7a523c3782
Merge pull request #324 from clarklee92/master
image-builder: get mount directory size with Mb format
2019-07-30 08:24:15 -05:00
Julio Montes
b1b8ce427a image-builder: check /sbin/init when AGENT_INIT=yes
kata-agent is moved to /sbin/init when AGENT_INIT is yes. Check
/sbin/init exists and it's not systemd

fixes #322

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-07-30 13:23:11 +00:00
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
ClarkLee
6d5aef531a osbuilder: Get mount directory size with Mb format
While calculating directory size in imagebuild script, we shoul use
`df -BM` instead of `df -h` to keep Mb format.

Fixes #336

image-builder: get mount directory size with Mb format

Signed-off-by: ClarkLee <clarklee1992@hotmail.com>
2019-07-29 23:03:17 +08: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