Commit Graph

339 Commits

Author SHA1 Message Date
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
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
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
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
GabyCT
148b6d7485
Merge pull request #299 from jodh-intel/doc-fixes
docs: Fix spelling and formatting
2019-05-27 10:59:02 -05:00
Salvador Fuentes
3fea550a4d
Merge pull request #297 from devimc/topic/image/fix-machine-id
image-builder: create /etc/machine-id
2019-05-24 16:03:07 -05:00
James O. D. Hunt
14534717c7 docs: Fix spelling and formatting
Correct spelling mistakes and resolve formatting issues.

Fixes: #298.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-24 17:09:13 +01:00
Julio Montes
a438d086b2 image-builder: create /etc/machine-id
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>
2019-05-23 07:38:12 -05:00
GabyCT
67b66c4d95
Merge pull request #295 from devimc/topic/rootfs/fixChrony
rootfs-builder: fix chrony service
2019-05-22 11:33:23 -05:00
Julio Montes
456be67094 rootfs-builder: fix chrony service
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>
2019-05-21 12:15:34 -05:00
James O. D. Hunt
1afb7e5685
Merge pull request #294 from jodh-intel/golang-use-latest-alpine
rootfs: Don't hardcode alpine version for golang images
2019-05-21 13:58:29 +01:00
James O. D. Hunt
d8c5706cff rootfs: Don't hardcode alpine version for golang images
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>
2019-05-21 10:51:05 +01:00
James O. D. Hunt
a800a5dee6
Merge pull request #290 from devimc/topic/image/removeSystemdUnits
image-builder/boot time: remove unneeded systemd units and files
2019-05-17 09:59:59 +01:00
Julio Montes
02b3b3b977 image-builder: remove unneeded systemd units and files
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>
2019-05-16 13:19:55 -05:00
James O. D. Hunt
4a2fa6875d
Merge pull request #287 from marcov/no-create-1
rootfs: use command vs which, avoid "1" file creation
2019-05-10 16:18:50 +01:00
Eric Ernst
c8e20e2a18
Merge pull request #288 from katabuilder/1.7.0-rc1-branch-bump
# Kata Containers 1.7.0-rc1
2019-05-10 07:58:27 -07:00
katacontainersbot
b9d9009cd9 release: Kata Containers 1.7.0-rc1
- docs: Fix markdown
- make: add nsdax source to install-scripts target
- rootfs-builder: remove /var/log

c5a17f7 docs: Fix markdown
7cfe5b4 image-builder: set default value of AGENT_INIT
0013352 make: add nsdax source to install-scripts target
c00849b rootfs-builder: remove /var/log

Signed-off-by: katacontainersbot <katacontainersbot@gmail.com>
2019-05-09 00:23:56 +00:00
Marco Vedovati
9a8f1688d5 rootfs: use command vs which, avoid "1" file creation
Replace "which" with "command", that's a bash built-in and should
not generate any stderr messages. This also fixex the spurious creating
of "1" file in the repo root because of a typo in stderr redirect.

Fixes: #286

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-05-07 12:29:51 +02:00
James O. D. Hunt
31b9a23da0
Merge pull request #279 from jodh-intel/fix-markdown
docs: Fix markdown
2019-05-02 18:06:14 +01:00
James O. D. Hunt
c5a17f7f4f docs: Fix markdown
Resolve issues with markdown in this repo.

Fixes #278.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-01 15:46:40 +01:00
James O. D. Hunt
ac6d19aba1
Merge pull request #284 from marcov/install-nsdax
make: add nsdax source to install-scripts target
2019-05-01 15:43:01 +01:00
James O. D. Hunt
24dbcbe88a
Merge pull request #273 from devimc/topic/removeLogs
rootfs-builder: remove /var/log
2019-04-29 09:29:47 +01:00
Marco Vedovati
7cfe5b4dd2 image-builder: set default value of AGENT_INIT
Set as default AGENT_INIT=no when not explicitly set, to make it
consistent with the other scripts in osbuilder

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-04-26 15:22:50 +02:00
Marco Vedovati
0013352d9b make: add nsdax source to install-scripts target
nsdax.gpl.c is required by image_builder.sh

Fixes: #283

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-04-26 15:20:18 +02:00
Eric Ernst
d5fbd1c25f
Merge pull request #277 from katacontainersbot/1.7.0-alpha1-branch-bump
# Kata Containers 1.7.0-alpha1
2019-04-17 13:23:54 -07:00
katacontainers bot
7465fde308 release: Kata Containers 1.7.0-alpha1
- image-builder: share the mkfs configuration file
- rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
- rootfs-builder: SELinux relabel container volumes
- image-builder: add fs type
- image-builder: re-implement image builder script
- builder: Pass the DEBUG flag when using docker
- Add chrony to image
- Print attempt number after max check

88b8523 image-builder: share the mkfs configuration file
77fb808 image-builder: check format_loop return code
8debe95 image-builder: add fs type
c72c954 rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
c1d9510 rootfs-builder: SELinux relabel container volumes
d8cdd88 image-builder: re-implement image builder script
f32ae14 tests: remove DAX env variable
f355c02 tests: enable DEBUG
6c7f307 image-builder: add xfsprogs to Dockerfile
ad6e1a9 scripts: implement error function
0d2ba47 builder: Pass the DEBUG flag when using docker
e16ff37 chrony: Comment out any NTP sources for chrony
3df19ff chrony: Add virtual PTP as source for chrony
ad5d879 rootfs: Print attempt number after max check
8fe6405 rootfs: Include chrony in the Dockerfile images
0b33519 rootfs: add PACKAGE var to debian config
510ddd2 rootfs: Add chrony service to rootfs

Signed-off-by: katacontainers bot <katacontainersbot@katacontainers.io>
2019-04-17 17:38:46 +00:00
Julio Montes
c00849b0bc rootfs-builder: remove /var/log
/var/log is not required in the rootfs

fixes #254

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-04-02 11:48:19 -06:00
GabyCT
edd7d9ccd3
Merge pull request #272 from devimc/topic/fsFeatures
image-builder: share the mkfs configuration file
2019-04-01 13:03:23 -06:00
Julio Montes
22d1bc50db
Merge pull request #269 from stefanha/rootfs-DOCKER_RUNTIME-env-var
rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
2019-04-01 10:38:50 -06:00
Julio Montes
e8bb3bcf23
Merge pull request #267 from stefanha/rootfs.sh-selinux-relabel
rootfs-builder: SELinux relabel container volumes
2019-04-01 10:38:42 -06:00
Julio Montes
88b85231ca image-builder: share the mkfs configuration file
Share with the container the mkfs configuration file to use only the
filesystem features supported in the host.

fixes #270

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-04-01 09:18:28 -06:00
GabyCT
a17d2bbb40
Merge pull request #271 from devimc/topic/fixWrongFS
image-builder: add fs type
2019-03-29 10:10:55 -06:00
Julio Montes
77fb8085f4 image-builder: check format_loop return code
check format_loop return code and die if it fails

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-29 07:47:22 -06:00
Julio Montes
8debe95b61 image-builder: add fs type
Add filesystem type to format the loop device.

fixes #270

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-28 15:10:16 -06:00
Stefan Hajnoczi
c72c95496e rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var
On some systems the "runc" runtime isn't available or has a different
name.  Allow the user to override the Docker runtime.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: #268
2019-03-28 15:48:15 +00:00
Stefan Hajnoczi
c1d9510cb3 rootfs-builder: SELinux relabel container volumes
rootfs.sh fails on machines with SELinux in enforcing mode if the
volumes aren't labelled.

This patch labels volumes so the container is able to access them.

In order to do this rootfs directory creation must be moved before the
Docker container is started.  Previously docker-run(1) would create the
rootfs directory in the USE_DOCKER case.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: #266
2019-03-28 15:39:35 +00:00
Sebastien Boeuf
20b087e3d2
Merge pull request #264 from devimc/topic/supportDAXandFC
image-builder: re-implement image builder script
2019-03-28 06:56:02 -07:00
Julio Montes
d8cdd88ace image-builder: re-implement image builder script
Re-implement image builder script to generate an image with a double MBR +
a DAX metadata. The DAX metadata is read by the NVDIMM driver to know the
beginning of the data in the pmem device.
This new image format is required to enable DAX in the kernels and hypervisors
that support NVDIMM, without breaking the compatibility with the kernels and
hypervisors that don't support it.

Following diagram shows how the resulting image will look like

```
	.-----------.----------.---------------.-----------.
	| 0 - 512 B | 4 - 8 Kb |  2M - 2M+512B |    3M     |
	|-----------+----------+---------------+-----------+
	|   MBR #1  |   DAX    |    MBR #2     |  Rootfs   |
	'-----------'----------'---------------'-----------+
	      |          |      ^      |        ^
	      |          '-data-'      '--------'
	      |                                 |
	      '--------rootfs-partition---------'
```

MBR: Master boot record.
DAX: Metadata required by the NVDIMM driver to enable DAX in the guest [1][2]
(struct nd_pfn_sb).
Rootfs: partition that contains the root filesystem (/usr, /bin, etc).

Kernels and hypervisors that support DAX/NVDIMM read the MBR #2,
otherwise MBR #1 is read.

[1] - https://github.com/kata-containers/osbuilder/blob/master/image-builder/\
nsdax.gpl.c
[2] - https://github.com/torvalds/linux/blob/master/drivers/nvdimm/pfn.h

fixes #263

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-26 09:02:45 -06:00
Julio Montes
f32ae14883 tests: remove DAX env variable
DAX envar is no more required to generate images with support for DAX

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-26 09:02:45 -06:00
Julio Montes
f355c026c0 tests: enable DEBUG
run tests with debug enabled to detect errors easier

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-03-26 09:02:45 -06:00