Commit Graph

5693 Commits

Author SHA1 Message Date
Jose Carlos Venegas Munoz
7b4b1d723b bump: check rc0 version after alpha
If we do a bump from an alpha release, the next
should be a rc0.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-10-08 18:47:57 +00:00
Jose Carlos Venegas Munoz
2bab82abb9 bump: version all repos
Instead of have special cases, just
bump all, bumps are check and more if are automated.

CI probbly not, but we can skip if necesary.

Fixes: #744

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-10-08 18:47:49 +00:00
Peng Tao
dd21046072 vc/store: fix TestStoreVCNewVCSandboxStore/TestStoreVCNewVCContainerStore
They both need to set a temporary test dir in order to run as non-root.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-10-08 09:32:45 -07:00
Peng Tao
6ab89e4549 vc/store: fix cache factory ut
In order to run the ut as non-root, we need to add a path prefix
for all store paths.

Fixes: #2113

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-10-08 09:29:37 -07:00
Peng Tao
4863aa998e vc/store: reuse store
As store.New() claims, we should reuse an existing store instead of
failing on duplicating stores.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-10-08 09:29:28 -07:00
Eric Ernst
f62bceba99
Merge pull request #1994 from stefanha/virtio-fs-v0.3
Virtio-fs v0.3 support
2019-10-08 08:27:32 -07:00
Jianyong Wu
5c43c968d2 kernel: enable ptp_kvm for arm64
This is a experimental feature for arm64 as linux kernel has
not enable kvm ptp for arm64.
ptp_kvm need co-work from host and guest, so you need add this
patch both to your guest and host. Host kernel version is better
lower than 5.0 and higher than 4.19.
another version of this patch base on kernel v5.3 is under review in kernel upstream, refer to [1]
to see the full info.

[1] https://lkml.org/lkml/2019/8/29/80

Fixes: #692
Signed-off-by: Jianyong Wu jianyong.wu@arm.com
2019-10-08 15:41:00 +08:00
Salvador Fuentes
ad1563196e virtiofsd: Do not use posix lock.
We have some issues trying to run `apt upgrade` on
a container that uses virtiofsd with `-o posix_lock`.

Add virtiofsd `-o no_posix_lock` argument to not use the
posix lock.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-07 16:21:33 -05:00
GabyCT
238f3cec56
Merge pull request #2104 from devimc/topic/virtcontainers/fcAgentLogs
virtcontainers: set agent's logs vsock port
2019-10-07 13:23:37 -05:00
Julio Montes
2b40b6b094 vendor: update kata agent
bring support for logging through a hybrid vsock

shortlog:
95be1c3 agent: add support for logging to a vsock port
a03e23b protocols/client: improve hybrid vsock parser
6a96997 protocols/client: make schemes and hybrid vsock dialer public
e01f23c network: Add a testcase for setupDNS
d733185 network: Setup DNS for sandbox

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-07 16:39:18 +00:00
Julio Montes
aa43e2a9ac virtcontainers: set agent's logs vsock port
In firecracker, there is no socket connected to /dev/console, so let's
use a vsock port to get agent's logs

Depends-on: github.com/kata-containers/shim#210

fixes #2103

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-07 16:39:18 +00:00
Stefan Hajnoczi
23a5dc7ff8 virtiofsd: use virtiofsd --syslog
Log to syslog instead of stderr.  This way all Kata and virtiofsd logs
are captured in syslog (or the systemd journal).  This makes debugging
much easier.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-10-07 14:21:30 +01:00
Stefan Hajnoczi
d5a3d0a61c virtiofs: use virtiofsd --fd=FDNUM
The new --fd=FDNUM file descriptor passing option eliminates the need to
wait for virtiofsd to create the vhost-user UNIX domain socket.  This is
a nice simplification because we can remove the timeouts and stderr
parsing.  There is no longer a race between launching virtiofsd and
launching QEMU, so we don't need to wait anymore.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2019-10-07 14:21:30 +01:00
Stefan Hajnoczi
6ce6a262a8 kata_agent: use virtio-fs 0.3+ mount options
virtio-fs changed the mount command-line.  Previously "mount none -o
tag=kataShared ..." was used.  Now "mount kataShared ..." is used
instead.

Since the "kataShared" tag is used for both 9P and virtio-fs, rename the
variable so that it is not 9P-specific.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Fixes: #1993
2019-10-07 14:21:28 +01:00
GabyCT
93197ddcc3
Merge pull request #2106 from chavafg/topic/makefile-virtiofs-typo
config: Fix `virtio-fs` typo in Makefile
2019-10-04 15:10:41 -05:00
Salvador Fuentes
80855a8ed4 ci: travis: allow ppc64le failures
ppc64le job on travis is being very unstable.
Allow failures on this job

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-04 12:33:31 -05:00
Salvador Fuentes
c3abd51a5b config: Fix virtio-fs typo in Makefile
typo `virtios-fs` should be `virtio-fs`.

Fixes: #2105.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-04 12:32:32 -05:00
Jose Carlos Venegas Munoz
b3aa770d95
Merge pull request #2075 from vijaydhanraj/acrn_vm_uuid_support
Hypervisor: UUID fix for acrn hypevisor
2019-10-04 09:39:46 -05:00
Jose Carlos Venegas Munoz
2591a1fb65
Merge pull request #2102 from devimc/topic/virtcontainers/fcFixSocketPerm
virtcontainers: change firecracker socket permissions
2019-10-04 09:26:50 -05:00
Eric Ernst
ba3d4f77fe
Merge pull request #2081 from amshinde/custom_annotations
Add annotations to provide custom configs
2019-10-03 18:24:59 -07:00
Eric Ernst
94906c40c3
Merge pull request #2095 from devimc/topic/virtcontainers/fixCRIOwFC
Fix CRIO + Firecracker
2019-10-03 18:24:50 -07:00
Eric Ernst
949d7631d8
Merge pull request #743 from chavafg/topic/virtiofsd-time-patch
static-build: Add patch that adds time to virtiofsd seccomp
2019-10-03 16:59:39 -07:00
Julio Montes
8f6b0a6a41 virtcontainers: change firecracker socket permissions
For security reasons, let's make sure 'others' don't have access to the
firecracker hybrid vsock

fixes #2101

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-03 21:23:19 +00:00
Salvador Fuentes
f3ff9c76a8 static-build: patch virtiofsd
Apply qemu/patches/virtiofsd/0001-add-time-to-seccomp.patch
to be able to build virtiofsd statically.

Fixes: #742.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-03 15:59:51 -05:00
Archana Shinde
8f70643d57 tests: Remove hardcoded annotation value.
Fix test by removing hardcoded annotation key. Use the
annotation package instead.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 11:53:18 -07:00
Archana Shinde
e7b9c36b90 tests: Add tests for annotations.
Tests verify hypervisor, runtime and agent annotations.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:44:44 -07:00
Archana Shinde
09129c1c13 config: Define minimum memory requirement
Introduce a constant for minimum memory requirement
in virtcontainers package, that can be used in config.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:44:43 -07:00
Archana Shinde
8405b56e6f annotations: add Annotations for the agent.
The annotations handle the tracing config for the agent.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:42:52 -07:00
Archana Shinde
5b78a8a0f8 annotations: Add annotations for runtime config
Additional annotations added to customise runtime configuration.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:42:52 -07:00
Archana Shinde
afb91c2e02 annotations: Add annotations to support additional configurations
Add annotation to support all hypervisor configurations.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:42:52 -07:00
Archana Shinde
845bf73726 annotations: Support annotations to customise kata config
Add support for annotations that allow us to custimise a subset
of the configurations provided in kata conf toml file.
This initial commit adds support for customising vcpus, default max
vcpus, memory and the kernel command line passed as Hypervisor
config.

Replaces #1695
Fixes #1655

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:42:52 -07:00
Archana Shinde
30d0b7add7 annotations: Add missing firmware and hashes to asset annotations
These annotations were missing from the list of what are
considered as assets. Add these to existing list.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:42:52 -07:00
Archana Shinde
46b68157d1 annotations: Change existing annotations to fit a new format
Change the naming schema for existing annotations from
"com.github.containers.virtcontainers" to "io.kata-containers"
The hypervisor related annotations are changed to reflect this.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-10-03 10:42:52 -07:00
Salvador Fuentes
494272b0ac
Merge pull request #371 from nitkon/master
osbuilder: Add USE_PODMAN as an alternate for USE_DOCKER
2019-10-02 13:51:57 -05:00
Julio Montes
312f3e7234 virtcontainers/fc: implement remove device
Unmount and unassign block device when it's required, that way the disk
can be unmounted and destroyed in the host.

fixes #1966

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-02 17:01:11 +00:00
Julio Montes
7e9cc5690d virtcontainers/fc: improve create disk pool process
Create a raw file and bind mount it to use it as disk is not needed,
instead a the raw file can be created at the jail path and use it directly
as disk, if a new container is added the real disk/device can be bind mounted
in the raw file.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-02 17:01:11 +00:00
Julio Montes
07932d59ab virtcontainers/fc: add logs and improve others to make debugging easier
add more logs and improve others to make firecracker debugging less painful

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-02 16:56:28 +00:00
Julio Montes
ed7240b40f virtcontainers: move device operations to a more generic place
move device operations to a more generic place where they can be used
in any hypervisor implementation.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-10-02 16:56:28 +00:00
Nitesh Konkar
15996014db osbuilder: Update README about USE_PODMAN variable
`USE_PODMAN` variable needs to be set for the osbuilder
scripts to use podman as a containerization engine to
build initrd/rootfs images. If both are set, `USE_DOCKER`
would take precedence over `USE_PODMAN`

Fixes: #370

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-10-02 21:58:41 +05:30
Nitesh Konkar
d1751a35e1 osbuilder: Add USE_PODMAN as an alternate for USE_DOCKER
In case a user wants to use podman instead of
docker to build initrd/rootfs images, facilitate
it by setting the variable `USE_PODMAN=true`.

Fixes: #370

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-10-02 21:58:02 +05:30
Jose Carlos Venegas Munoz
29d0ea9e81
Merge pull request #740 from chavafg/topic/fix-fc-install
static-build: Fix build for Firecracker v0.18
2019-10-01 18:06:22 -05:00
Salvador Fuentes
f10d48ced1 virtiofs: Add virtiofsd patch that adds time to seccomp
time syscall on seccomp is needed to be able to build
virtiofsd successfully.
This patch is currently not availabe upstream, so lets
add it until it becomes available.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-01 16:18:05 -05:00
Eric Ernst
46d1957e0f
Merge pull request #1875 from gabibeyer/rootlessLogic
rootless: add rootless to kata
2019-10-01 11:17:38 -07:00
Salvador Fuentes
c350abb3d9
Merge pull request #737 from Pennyzct/FC_SERIAL_PORT_CONFIG
Kernel: Support Firecracker on aarch64
2019-10-01 12:56:43 -05:00
Salvador Fuentes
4b8ba67607 static-build: Fix build for Firecracker v0.18
Removes `--vsock` flag when building Firecracker since
the flag was removed as vsock is enabled by default.

Also update the path where the binaries are placed.

Fixes: #739.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-10-01 11:50:08 -05:00
Julio Montes
d1fdf4083e
Merge pull request #369 from nitkon/patch-2
README: Update how to use DEBUG variable
2019-10-01 09:11:38 -05:00
GabyCT
9a9a8978f5
Merge pull request #364 from nitkon/fix_yq
Fix yq
2019-09-30 12:32:34 -05:00
nitkon
d2d029ce47
README: Update how to use DEBUG variable
Update osbuilder README to use DEBUG
environment variable for executing scripts in
debug mode.

Fixes:  #368

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-09-28 23:12:20 +05:30
Salvador Fuentes
3f57e8d64b
Merge pull request #730 from Kvasscn/dev
kernel: avoid to download sha256sums.asc file repeatedly
2019-09-26 16:20:59 -05:00
Salvador Fuentes
3e4b381248
Merge pull request #366 from nitkon/dns_initrd
initrd_builder: Create empty resolv.conf in rootfs
2019-09-26 12:04:39 -05:00