Commit Graph

4802 Commits

Author SHA1 Message Date
Julio Montes
7d1610e8fa kernel: drop x86_64 4.19 config file
Now we are using the fragments, drop the x86_64 4.19 config file
so we default to fragment mode.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-25 18:13:03 +00:00
Graham Whaley
addc10be48 kernel: config: frags: add common and x86 fragments
Add the base common fragments and x86_64 specific fragments
for the 4.19.x kernel.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-25 18:13:03 +00:00
Graham Whaley
d205a07d65 kernel: configs: update README
Embellish the README a bit, and add some details about the
new fragment method.

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-25 18:13:03 +00:00
Graham Whaley
0e604bde96 kernel: configs: add kernel fragment support
Add the framework to build kernel config files from trees
of kernel fragments.

If no fragment directory is found for the requested kernel
version and architecture then revert to looking for a whole
prebuilt kernel config file instead.

Fixes: #234

Signed-off-by: Graham Whaley <graham.whaley@intel.com>
2019-07-25 18:13:03 +00:00
James O. D. Hunt
304ed95794 release: Add a Docker config script for static Kata
Create a script that will be added to the
`kata-static-${version}-${arch}.tar.xz` file and which can be either run
directly by the user to configure Docker, or can be run indirectly by
the `kata-manager` script.

Fixes: #648.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-07-25 15:34:00 +01:00
James O. D. Hunt
792504eee2
Merge pull request #1910 from amshinde/remove-nested-vendor-dir
Remove nested vendor dir
2019-07-25 09:16:23 +01:00
Fupan Li
943136e18b
Merge pull request #1899 from bergwolf/ut
Fix UT failures with non-root
2019-07-25 11:46:08 +08:00
Archana Shinde
e41a6b94f9 vendor: Update vendor directories
Update top-level vendor with
"dep ensure add github.com/blang/semver@3.6.1"
dep check should not succeed.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-07-24 14:33:44 -07:00
Archana Shinde
95e8a7a15c dep: Remove nested vendor directories
It is not really recommended to have nested vendor directories.
dep does not work well with nested directories:
https://github.com/golang/dep/issues/985
Recommendation is to use flatten the vendor directories.

Hence remove any nested vendor directories.

Fixes #1909

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
2019-07-24 14:33:22 -07:00
GabyCT
b529bb0887
Merge pull request #651 from jcvenegas/add-back-ubuntu
distros: add ubuntu 16.04 back
2019-07-24 16:05:42 -05:00
Julio Montes
93e9997850 scripts: fix detection of qemu 4.1
quote `>= 4.1` to avoid bash redirects `echo`'s output to a
new file named `=`

fixes #652

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-07-24 20:31:40 +00:00
GabyCT
e5a137639f
Merge pull request #650 from devimc/topic/snap/1.9.0-alpha0
snap: release 1.9.0-alpha0
2019-07-24 13:31:07 -05:00
GabyCT
e9cb861fca
Merge pull request #519 from nitkon/patch-4
architecture.md: Fix networking info
2019-07-24 12:36:05 -05:00
GabyCT
ea8e48d079
Merge pull request #522 from nitkon/patch-5
architecture.md: Fix broken CRI link
2019-07-24 12:30:03 -05:00
nitkon
73aa0977ac
architecture.md: Fix broken CRI link
Fix broken CRI Link. 

Fixes:  #521

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-07-24 22:24:13 +05:30
Jose Carlos Venegas Munoz
546dc141a9 distros: add ubuntu 16.04 back
Seems that OBS now fixed issues with ubuntu,
add it back.

Fixes: #607

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-07-24 11:39:29 -05:00
Julio Montes
57e4f9ccb6 snap: use the same version of tests to test the snap
Test the snap with the same verions of tests

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-07-24 15:39:17 +00:00
nitkon
3c250509d1
architecture.md: Fix networking info
The networking part of the doc talks about the 
two ends of the veth pair. One end is in the container
networking namespace and the other one should
be in the host networking namespace. Fix this info.

Fixes: #518

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-07-24 20:21:46 +05:30
Graham Whaley
4e67de847b
Merge pull request #584 from nitkon/patch-6
README: Fix a typo in Kernel Readme
2019-07-24 10:15:25 +01:00
Julio Montes
72ed49e0a3 snap: release 1.9.0-alpha0
bump snap version

fixes #649

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-07-23 19:34:52 +00:00
Salvador Fuentes
28b0ed9209
Merge pull request #335 from Pennyzct/fedora_28_on_aarch64
fedora-rootfs: using fedora 28 on aarch64
2019-07-23 10:40:23 -05:00
Eric Ernst
6ce5f30d6c
Merge pull request #1889 from WeiZhang555/persist-data
persist: manage "hypervisor.json" with new store
2019-07-23 08:19:11 -07:00
Penny Zheng
9bfc083ef5 fedora-rootfs: using fedora 28 on aarch64
For some reason, busybox image crashed on fedora 30 rootfs on aarch64.
For now, we will switch back to use fedora 28.

Fixes: #334

Signed-off-by: Penny Zheng <penny.zheng@arm.com>
2019-07-23 17:43:38 +08:00
Wei Zhang
f3d0978c3f persist: improve readability
Address some comments for code readability, also add some unit tests.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-07-23 17:10:00 +08:00
Wei Zhang
3bfbbd666d persist: merge "network.json"
Merge "network.json" into "persist.json" so that new store can manage
network part.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-07-23 17:10:00 +08:00
Wei Zhang
99cf3f80d7 persist: merge "agent.json"
Manage "agent.json" with new store.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-07-23 17:10:00 +08:00
Wei Zhang
7d5e48f1b5 persist: manage "hypervisor.json" with new store
Fixes #803

Merge "hypervisor.json" into "persist.json", so the new store can take
care of hypervisor data now.

Signed-off-by: Wei Zhang <weizhang555.zw@gmail.com>
2019-07-23 17:09:11 +08:00
Hui Zhu
688732adee
Merge pull request #1897 from bergwolf/monitor
improve robustness w.r.t. dead hypervisor
2019-07-23 16:56:06 +08:00
Peng Tao
d5d7d82eeb vc: move container mount cleanup to container.go
For one thing, it is container specific resource so it should not
be cleaned up by the agent. For another thing, we can make container
stop to force cleanup these host mountpoints regardless of hypervisor
and agent liveness.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:29:32 -07:00
Peng Tao
e02f6dc067 shimv2: monitor sandbox liveness
When sandbox quits unexpected, clean things up as much as we can.

Fixes: #1896
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:29:32 -07:00
Peng Tao
262484de68 monitor: watch hypervisor
When hypervisor process is dead, notify watchers and mark agent dead.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:29:32 -07:00
Peng Tao
67c401c059 agent: use hypervisor pid as backup proxy pid for non-kata proxy cases
Then we can check hypervisor liveness in those cases to avoid long
timeout when connecting to the agent when hypervisor is dead.

For kata-agent, we still use the kata-proxy pid for the same purpose.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:29:32 -07:00
Peng Tao
835b6e9e1b sandbox: do not fail SIGKILL
Once we have found the container, we should never fail SIGKILL.
It is possible to fail to send SIGKILL because hypervisor might
be gone already. If we fail SIGKILL, upper layer cannot really
proceed to clean things up.

Also there is no need to save sandbox here as we did not change
any state.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:29:32 -07:00
Peng Tao
bc4460e12f sandbox: support force stop
When force is true, ignore any guest related errors. This can
be used to stop a sandbox when hypervisor process is dead.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:29:32 -07:00
Peng Tao
4130913ed7 agent: mark agent dead when failing to connect
Whenever we fail to connect, do not make any more attempts.
More attempts are possible during cleanup phase but we should
not try to connect any more there.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:27:52 -07:00
Peng Tao
c472a01006 container: allow to stop a paused container
When a container is paused and something goes terribly
wrong, we still need to be able to clean thing up. A paused
container should be able to transit to stopped state as well
so that we can delete it properly.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:27:52 -07:00
Peng Tao
f886c0bf35 vc: drop container SetPid API
It is not used by anyone.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-22 19:27:52 -07:00
Salvador Fuentes
ff5f1b4273
Merge pull request #1890 from devimc/topic/virtcontainers/useTestity
virtcontainers: convert virtcontainers tests to testify/assert
2019-07-22 16:17:24 -05:00
Archana Shinde
c7af16d363
Merge pull request #1904 from GabyCT/topic/checkgo
ci: Allow travis to use go install script
2019-07-22 11:36:59 -07:00
Jianyong Wu
17512dc3cb nemu: enable compile nemu for arm64 on x86 host
This patch enable compile nemu for arm64 in container
on x86 host.

fixed: #577
Signed-off-by: Jianyong Wu  <jianyong.wu@arm.com>
2019-07-22 17:46:41 +08:00
Gabriela Cervantes
f2e6a31dfc ci: Allow travis to use go install script
This allows travis to use the go install script instead of having a
hard coded golang version at travis.yml

Fixes #1903

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
2019-07-22 02:07:56 -05:00
Marco Vedovati
8ebaac02d1 rootfs: move code from rootfs.sh to lib.sh
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>
2019-07-20 09:01:03 +02:00
Eric Ernst
3655b4c197
Merge pull request #445 from grahamwhaley/20190424_minikube_docs
install: Add minikube instructions
2019-07-19 17:11:16 -05:00
Eric Ernst
37c2872f29
Merge pull request #1892 from egernst/1.9.0-alpha0-branch-bump
# Kata Containers 1.9.0-alpha0
2019-07-19 11:56:16 -05:00
Peng Tao
3063391334 ut: skip TestBindUnmountContainerRootfsENOENTNotError for non-root
mount syscall requires root.

Fixes: #1898
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-19 08:44:51 -07:00
Peng Tao
c4583f4486 ut: skip TestStartNetworkMonitor for non-root
It requires root to manipulate netns and otherwise fails
like below:

=== RUN   TestStartNetworkMonitor
--- FAIL: TestStartNetworkMonitor (0.00s)
        Error Trace:    sandbox_test.go:1481
        Error:          Expected nil, but got: &errors.errorString{s:"Error switching to ns /proc/6648/task/6651/ns/net: operation not permitted"}

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-07-19 08:36:43 -07:00
Julio Montes
f2423e7d7c virtcontainers: convert virtcontainers tests to testify/assert
Convert virtcontainers tests to testify/assert to make the virtcontainers
tests more readable.

fixes #156

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-07-19 15:28:45 +00:00
Ace-Tang
50e263d943 qemu: support vfio pass x-pci-vendor-id and x-pci-device-id pass
since some vendor id like 1ded can not be identified by virtio-pci
driver, so need to pass a specified vendor id to qemu.

Fixes: #1894

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-07-19 21:04:22 +08:00
Ace-Tang
2cf4189244 vendor: update github.com/intel/govmm
update to commit 52b2309a55

Fixes: #1894

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-07-19 20:57:21 +08:00
Jose Carlos Venegas Munoz
cd9ab72636
Merge pull request #333 from egernst/1.9.0-alpha0-branch-bump
# Kata Containers 1.9.0-alpha0
2019-07-18 16:23:19 -05:00