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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
systemd complains if `/etc/machine-id` does not exist. Create the `machine-id`
file to make systemd happy, it'll bind-mount that file to write the machine id.
fixes#296
fixes github.com/kata-containers/runtime#1537
Signed-off-by: Julio Montes <julio.montes@intel.com>
Chrony service is not started because it requires a private temporal directory,
these directories can't be created in read-only filesystems. Create a symlink
to /tmp in /var allowing systemd to create private temporal directories.
fixes#280
Signed-off-by: Julio Montes <julio.montes@intel.com>
Remove the version of alpine used when pulling golang docker images.
This ensures the latest version of alpine is used and resolves the
maintenance issue when old versions of alpine are dropped.
Fixes: #293.
Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Remove systemd units and files that are not needed in Kata Containers.
Removing this files we can improve the boot time.
fixes#289
Signed-off-by: Julio Montes <julio.montes@intel.com>