Commit Graph

5325 Commits

Author SHA1 Message Date
Eric Ernst
d9a7780514
Merge pull request #1951 from amshinde/deprecate-bridged-mode
network: Deprecate bridged networking mode.
2019-08-12 07:06:45 -07: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
Archana Shinde
565f14f685 acrn: Change the default network model for ACRN to macvtap
Drop the bits for bridged networking in ACRN and change the default
to macvtap. We should eventually change this to tcfilter with additional
testing.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-08-09 13:01:54 -07:00
Archana Shinde
2c99b95c53 network: Deprecate bridged networking mode.
We plan to get rid of this feature in the future.

Fixes: #1950

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-08-09 13:01:47 -07:00
GabyCT
88f8216978
Merge pull request #342 from devimc/topic/rootfs/kmod
Add kmod package
2019-08-09 14:05:45 -05:00
nitkon
311bd47795
kernel: Update README with right instructions
Fix the instructions in the README guide
when setting up kernel source code. 

Fixes:  #673

Signed-off-by: Nitesh Konkar <niteshkonkar@in.ibm.com>
2019-08-09 22:22:38 +05:30
Julio Montes
987fe3067e
Merge pull request #344 from marcov/dracut-improvements
dracut: improve host distro support
2019-08-09 11:39:23 -05:00
jiangpengfei
e467293a3e virtcontainers: fix hotplug pci devices execeed max capacity bug
add rollback operations when hotplug block/net devices execeed pciBridgeMaxCapacity

Fixes: #1941

Signed-off-by: jiangpengfei <jiangpengfei9@huawei.com>
2019-08-09 12:31:46 -04: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
GabyCT
f4c26c1ac3
Merge pull request #672 from devimc/topic/static-build/fix
static-build: fix nemu static-build
2019-08-08 17:08:07 -05: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
Eric Ernst
604e1ab24f versions: kernel: update to 4.19.65
52 is long in the tooth.  On to x.y.65!

Fixes: #1947

Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-08-08 13:24:04 -07: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
Julio Montes
dba3ffa3ae static-build: fix nemu static-build
Fix `arch` assignment and define `Dockerfile` variable to avoid
usage of unbound variables.

fixes #671

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-08 19:41:36 +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
Julio Montes
ee952ee479
Merge pull request #578 from jongwu/build_nemu
nemu: enable compile nemu for arm64 on x86 host
2019-08-08 09:34:32 -05:00
Julio Montes
14474a49a2
Merge pull request #1921 from Ace-Tang/fix-remove-network
network: fix failed to remove network
2019-08-07 14:06:52 -05:00
GabyCT
a3eb19ca9b
Merge pull request #1926 from devimc/topic/virtcontainers/loadKernelModules
virtcontainers: add support for loading kernel modules
2019-08-07 11:01:43 -05:00
Julio Montes
b9cde5bbaa
Merge pull request #1930 from Ace-Tang/fix-shim-leak
shim-v2: fix shim leak when hypervisor exit unexpectly
2019-08-07 09:27:17 -05:00
Archana Shinde
df7cf77a08 network: Ignore routes with proto as "kernel"
Routes with proto "kernel" are routes that are automatically added
by the kernel.
It is a route added automatically when you assign an address to an
interface which is not /32.
With this commit, these routes are ignored. The guest kernel
would add these routes on the guest side. A corresponding commit on the
agent side would no longer delete these routes while updating them.

Without this commit, netlink gives an error complaining that a route
already exists when you try to add a route with the same dest subnet.

Something like:
dest: 192.168.1.0/24 device:net1 source:192.168.1.217 scope:253
dest: 192.168.1.0/24 device:net2 source:192.168.1.218 scope:253

Depends-on: github.com/kata-containers/agent#624

Fixes: #1811

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-08-06 21:39:11 +00:00
GabyCT
48e004367c
Merge pull request #1935 from eryugey/dev
virtiofs: wait for virtiofsd process to release its resources
2019-08-06 16:03:23 -05:00
GabyCT
e052e57b3e
Merge pull request #1938 from devimc/topic/pkg/dontSetInit
pkg/katautils: Do not set `init` in the kernel command line
2019-08-06 16:01:40 -05:00
Julio Montes
355b9c003d virtcontainers: add support for loading kernel modules
The list of kernel modules can be passed to the runtime through the
configuration file or using OCI annotations. In both cases, a list paramentes
can be specified for each module.

fixes #1925

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-06 20:55:49 +00:00
Julio Montes
979f064df3 vendor: update kata agent
Bring support for loading kernel modules

shortlog:
72a50ef revert: agent: sandbox_pause should get arguments from proc
ad72fe8 agent: add support for loading kernel modules
4ab32a9 vendor: dep check fixes
b8b8dac s390x: add virtio-blk-ccw support
cf20c9b ci: Allow travis to use go install script
5ffb2a6 agent: make NoPivotRoot config depend on `/` fs type
a1c9d50 make: install depends on $(TARGET)
7c97a0a agent: delete element of sandbox.deviceWatchers with right key
d0117bf release: Kata Containers 1.9.0-alpha0
4354b24 tests: Add lots of new unit tests
d4a22d1 device: Allow uevent handler to be stopped
8eb2134 config: Add parseCmdlineOption test
d4f205d device: Add extra checks
faa6cb0 mount: Fix incorrect error return
2d95c36 mount: Add test for parseMountFlagsAndOptions
5163bab console: Add debug console test
d167490 sandbox: Remove redundant check
72fc0ad mount: Improve error message
c92715f tests: Add test for getMemory
cd2f994 memory: Add extra check for memory file
458b4aa vendor: Move to a previous version for runtime-spec vendor
3cce728 vendor: Update the vendoring for github.com/opencontainers/runtime-spec
7ae6030 release: Kata Containers 1.8.0-rc0
32428bc vendor: update dependency opencontainers/runc
cfbd8c9 agent: sandbox_pause should get arguments from proc
47476d4 agent: lock subreaper agent thread
3548e65 release: Kata Containers 1.8.0-alpha2
0ead592 docs: Fix capitalization
9b59925 mount: Virtio-blk container rootfs mount for ACRN hypervisor
cf50209 release: Kata Containers 1.8.0-alpha1
0666ef0 release: Kata Containers 1.8.0-alpha0
ca2f724 grpc: add unit test for onlineResources function
06a0743 tmp: Add tmp.mount to kata-containers.target
353263d docs: Fix typos and formatting
5064045 docs: Add missing document link
c66349b mount: Add a proper rollback path to addStorages()
5583acd release: Kata Containers 1.7.0
5f9df74 updateInterface: enable hot-add nic on arm64
86ca8e0 vendor: update gogo/protobuf to v1.2.1
c9343fb release: Kata Containers 1.7.0-rc1
560dc87 vendor: update vsock package version
0af7173 agent: support debug console
d9aa453 proto: add network stats
3169c9b docs: Fix markdown in TRACING.md
8aa2880 release: Kata Containers 1.7.0-alpha1
2ada1d1 agent: Display trace details
cb32d28 test: Fix mockContainer
3e12793 agent: Fix container creation
6e558f7 vendor: Update libcontainer vendoring
7fbd860 agent: send SIGKILL instead of SIGTERM to container init process
8847998 agent: Add support for local storage
8b34aaf make: Add build option STATIC=1 to statically link
01b1cb2 travis: Use xenial
d815c97 lint: Update code to handle lint issues
828b417 ci: Update travis go version from 1.10 to 1.11
f61ca8a release: Kata Containers 1.7.0-alpha0
bdf2290 ci: travis: checkout test repo to correct branch
209aa2f agent: Fix "agent grpc server quits" show wrong error
2af3599 channel: Check for channel type in kernel cmdline options
8187461 vendor: use latest github.com/mdlayher/vsock
39696c0 vendor: Revert "vendor: Update libcontainer vendoring"
7866668 agent: Revert "agent: Fix container creation"
8f893b9 test: Revert "test: Fix mockContainer"
49e5847 systemd-target: Add chronyd.service to kata-containers.target
0bf9d1e make: Install systemd targets in systemd unit dir
85e0942 docs: Explain shutdown behaviour with tracing
99d6118 docs: Define "VM" in tracing doc
353ec2d service: Fix user initiated shutdown with static tracing

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-06 20:55:49 +00:00
Jose Carlos Venegas Munoz
973be7b706
Merge pull request #666 from jcvenegas/obs-detect-build
obs: wait: Fix error to detect building job
2019-08-06 12:59:37 -05:00
Julio Montes
0832294ba1 pkg/katautils: Do not set init in the kernel command line
Currently kata sets the init process to systemd even when it isn't installed,
the criteria to determinate whether systemd is used as init or not
is very odd, since kata only checks whether the `image` option is set in the
configuration file, unfortunately not all images have systemd installed.
Instead kata should rely on the guest kernel and `osbuilder` to use the right
init process. `osbuilder` creates a symbolic link to `systemd` or `kata-agent`
depending on the `AGENT_INIT` environment variable.

fixes #1937

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-06 15:45:19 +00:00
Jose Carlos Venegas Munoz
3ba0d65272 obs: wait: Fix error to detect building job
The job to wait for packages are built is failing randomly.

Seems that sometimes the command is not returning and expected
out out and may be mask by the

`while osc pr | grep; done`

This probably can fail at osc pr but because it failed at
osc and not grep we consider is working.

- We check for more states that we consider not ready,
like excluded or blocked.

First query the result, if fail the script will stop,
if not then try to find the string `state=building`.

Additionally, check for failed jobs in the same query to
stop the job earlier.

Fixes: #665

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-08-06 09:14:53 -05:00
Ace-Tang
20587519cd shim-v2: fix shim leak when hypervisor exit unexpectly
Fixes: #1929

in containerd-kata-v2, container can only be deleted in Delete
interface, or other shim operates(like kill/delete) all fails
since can not get container info.

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-08-06 15:48:26 +08:00
Eryu Guan
a9168a3fc9 virtiofs: wait for virtiofsd process to release its resources
We start virtiofsd in foreground (-f option), so we should wait for it
to reclaim its resources to avoid zombie process when qemu or virtiofsd
got killed unexpectedly.

Fixes: #1934
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2019-08-06 14:55:22 +08:00
Ganesh Maharaj Mahalingam
fbd3baae76
Merge pull request #664 from devimc/topic/snap/useMaster
snap: use master branch to test the snap
2019-08-05 16:49:27 -07:00
Julio Montes
5e4a9dbc95 obs-packaging: scape next line to check if .config file exist
OBS fails because of a syntax error in debian.rules

```
/bin/sh: 1: Syntax error: end of file unexpected (expecting "fi")
```

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-05 21:18:07 +00:00
GabyCT
f8873a088f
Merge pull request #527 from grahamwhaley/20190801_minikube_fc
minikube: note kata-fc does not function under minikube
2019-08-05 10:32:09 -05:00
Jose Carlos Venegas Munoz
00e0aaa6e4
Merge pull request #1924 from ganeshmaharaj/vhost-fs-hotplug-cache-error
virtiofs: fix virtiofs crash when cache=none
2019-08-02 15:47:35 -05:00
Julio Montes
0c6911b91d snap: use master branch to test the snap
Use master branch to test the snap in order to detect errors earlier
before releasing the next snap

fixes #663

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-08-02 15:45:15 +00: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
Graham Whaley
675f221bbd minikube: note kata-fc does not function under minikube
`kata-fc` does not presently function under `minikube` due to
lack of block based storage. Make that clear in the installation
documents, to help prevent users going through the whole install
process, only to be disappointed when they find ti does not work.

Fixes: #526

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-08-02 10:49:41 +01:00
James O. D. Hunt
4de74b4d67
Merge pull request #1928 from ganeshmaharaj/ignore-arcn-toml
acrn: Add toml to gitignore
2019-08-02 09:18:51 +01:00
Ganesh Maharaj Mahalingam
263fb64ec6 acrn: Add toml to gitignore
Add acrn's generated configuration toml file to the gitignore list.

Fixes: #1927
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-08-01 13:38:57 -07:00
Ganesh Maharaj Mahalingam
6e1e6a2297 virtiofs: fix virtiofs crash when cache=none
When virtio_fs_cache is set to none, the mount options for the folder
inside the guest should not contain the dax option else it leads to
invalid address errors and a crash of the daemon on the host.

Fixes: #1907
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-08-01 13:26:34 -07: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
James O. D. Hunt
1aec41a28d
Merge pull request #512 from GabyCT/topic/fixdebiandoc
docs: Fix debian installation guide
2019-08-01 09:34:38 +01: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
Eric Ernst
74157c8b2b
Merge pull request #1861 from jcvenegas/k8s-1.15
versions: Upgrade to k8s 1.15
2019-07-31 21:30:41 -07:00
Ganesh Maharaj Mahalingam
72321d298f
Merge pull request #658 from jcvenegas/debian-10-obs
obs: add debian 10
2019-07-30 10:55:26 -07: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
Ace-Tang
50c3e56aeb network: fix failed to remove network
in create sandbox, if process error, should remove network without judge
NetNsCreated is true, since network is created by kata and should be
removed by kata, and network.Remove has judged if need to delete netns
depend on NetNsCreated

Fixes: #1920

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-07-30 20:17:09 +08:00
Eric Ernst
1e66d93d21
Merge pull request #514 from cgxu519/doc-fix-1
docs: Fix workaround solution for ConfigPath
2019-07-29 19:41:00 -07:00
Jose Carlos Venegas Munoz
0d0a84e903 versions: Upgrade to k8s 1.15
Bump CI to kubernetes 1.15.

Fixes: #1860

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-07-29 15:11:21 -05:00