Commit Graph

1712 Commits

Author SHA1 Message Date
Marco Vedovati
5bfca6e38e test: add arch required kernel modules
Add a test for the checkKernelModules returned error count value.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-23 11:48:18 +02:00
Marco Vedovati
db5097835a kata-check: require kvm/vhost modules for amd64
KVM/vhost modules are required when using QEMU or firecracker.

Fixes: #1985

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-08-20 17:58:11 +02:00
Hui Zhu
7019ce5c9b
Merge pull request #1964 from bergwolf/qemu-improvements
qemu interaction improvements
2019-08-19 11:08:36 +08:00
Peng Tao
e7457e6248 qemu: add logfile when debug is on
So that we can check qemu log to see if something goes wrong.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-16 12:58:25 +00:00
Peng Tao
aebc49692b qemu: fix memory prealloc option handling
Memory preallocation is just a property that hugepage, file backed
memory and memory-backend-ram can each choose to configure.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-16 12:58:25 +00:00
Peng Tao
6c77d76f24 qemu: check guest status with qmp query-status
When guest panics or stops with unexpected internal
error, qemu process might still be running but we can
find out such situation with qmp. Then monitor can still
report such failures to watchers.

Fixes: #1963
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-16 12:58:25 +00:00
Peng Tao
5b50b34df4 shimv2: cancel monitor before stopping sandbox
So that we don't trigger sandbox watcher on our own.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-16 12:58:25 +00:00
Peng Tao
49184ee562 vendor: update govmm
164bd8c test/fmt: drop extra newlines
73555a4 qmp: add query-status API
234e0ed qemu: fix memory prealloc handling
30bfcaa qemu: add debug logfile

dep now checks for dependency recersively.
runtime-spec and gogo protobuf are also updated as being required by kata agent.

Solving failure: No versions of github.com/kata-containers/agent met constraints:
        94e2a254a94a77c02280f4f84d7f82269be163ce: Could not introduce github.com/kata-containers/agent@94e2a254a94a77c02280f4f84d7f82269be163ce, as it has a dependency on github.com/opencontainers/runtime-spec with constraint a1b50f621a48ad13f8f696a162f684a241307db0, which has no overlap with existing constraint 5806c35637336642129d03657419829569abc5aa from (root)

Solving failure: No versions of github.com/kata-containers/agent met constraints:
        94e2a254a94a77c02280f4f84d7f82269be163ce: Could not introduce github.com/kata-containers/agent@94e2a254a94a77c02280f4f84d7f82269be163ce, as it has a dependency on github.com/gogo/protobuf with constraint 4cbf7e384e768b4e01799441fdf2a706a5635ae7, which has no overlap with existing constraint 342cbe0a04158f6dcb03ca0079991a51a4248c02 from (root)

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-16 12:55:10 +00:00
Peng Tao
b3987e4786
Merge pull request #1933 from lifupan/noproxywatchconsole
add watchconsole for no_proxy type
2019-08-16 11:06:02 +08:00
Julio Montes
de4582eda3
Merge pull request #1959 from bergwolf/stopvm
qemu: do not try to stop qemu multiple times
2019-08-15 08:50:17 -05:00
Julio Montes
0bf48dca65
Merge pull request #1969 from bergwolf/detach
do not hotplug network device when stopping sandbox
2019-08-15 08:46:06 -05:00
Peng Tao
d90eba8593 network: always cold unplug network devices
We don't really need to unplug it from guest because we have
already stopped it. Just detach it and clean it up.

Fixes: #1968
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-15 00:02:52 -07:00
Peng Tao
d26ff71201 Revert: "sandbox: remove network before stopping vm"
This reverts commit 794e08e243.

It breaks vfio device passthru as we need to bind the device
back to host when removing the endpoint. And that is not possible
when qemu is still running (thus holding reference to the device).

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-15 00:02:44 -07:00
Eric Ernst
a5c7e6b934
Merge pull request #1962 from bergwolf/grpc-timeout
agent: add default timeout for grpc requests
2019-08-14 21:04:20 -07:00
Fupan Li
99e04ac8cd
Merge pull request #1961 from bergwolf/pause-ready
container: do not pause a StateReady container
2019-08-14 08:54:59 +08:00
Eric Ernst
263f64829d
Merge pull request #1957 from bergwolf/network-removal
sandbox: remove network before stopping vm
2019-08-13 09:32:21 -07:00
Julio Montes
5e631391bf
Merge pull request #1942 from woshijpf/fix-hotplug-exceed-problem
virtcontainers: fix hotplug block/net devices execeed pciBridgeMaxCap…
2019-08-13 08:45:24 -05:00
Peng Tao
debc7d93ad agent: add default timeout for grpc requests
If guest is malfunctioning, we need a way to bail out. Add
a default timeout for most of the grpc requests so that the
runtime does not wait indefinitely.

Fixes: #1952
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-13 01:22:05 -07:00
Peng Tao
9d4050e0b1 container: do not pause a StateReady container
We can only pause a running container.

Fixes: #1960
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-13 01:19:36 -07:00
Peng Tao
b58ab66f05 qemu: do not try to stop qemu multiple times
We've cleaned it up the first time. Future stop will
only fail.

Fixes: #1958
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-13 01:13:06 -07:00
Peng Tao
794e08e243 sandbox: remove network before stopping vm
We might need to call hypervisor hotunplug to really remove
a network device. We cannot do it after stopping the VM.

Fixes: #1956
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-08-13 01:04:07 -07:00
lifupan
31ddb4d452 virtcontainers: add watchconsole for no_proxy type
For no proxy type, we also need the feature
of watch hypervisor's console to help debug.

Fixes:#1932

Signed-off-by: lifupan <lifupan@gmail.com>
2019-08-13 09:09:23 +08:00
Archana Shinde
9ea469bcfa
Merge pull request #1954 from amshinde/propagate-vsock-error
vsock: Propogate error for vsock ioctl
2019-08-12 17:22:25 -07:00
Archana Shinde
3fc17e96fc vsock: Propogate error for vsock ioctl
Make error handling better by propogating error.

Fixes #1953

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-08-12 12:13:52 -07:00
Jose Carlos Venegas Munoz
4cf1fa687d
Merge pull request #1948 from egernst/kernel-4.19-65
versions: kernel: update to 4.19.65
2019-08-12 11:39:56 -05:00
Eric Ernst
cfedb06a19
Merge pull request #1936 from amshinde/ignore-routes-with-kernel-proto
network: Ignore routes with proto as "kernel"
2019-08-12 07:08:34 -07:00
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
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
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
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
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
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
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
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
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
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
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
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
Julio Montes
3255640d54
Merge pull request #1914 from devimc/topic/virtcontainers/supportSMPDie
virtcontainers: support SMP die
2019-07-26 18:03:56 -05:00