Commit Graph

5061 Commits

Author SHA1 Message Date
lifupan
f301c957f6 shimv2: shutdown the sandbox when sandbox container exited
Kubelet would cleanup the pod cgroup resources and kill the processes
in the pod cgroups when it detected all of the containers in a pod exited,
thus shimv2 should close the hypervisor process once the podsandbox container
exited, otherwise, the hypervisor process would be killed by kubelet and
made shimv2 failed to shutdown the sandbox.

Fixes:#1672

Signed-off-by: lifupan <lifupan@gmail.com>
2019-05-22 06:32:27 +00:00
Ace-Tang
d6b3bffad8 shimv2: remove use containerd ns as netns
```
//the network namespace created by cni plugin
netns, err = namespaces.NamespaceRequired(ctx)
if err != nil {
        return nil, errors.Wrap(err, "create namespace")
}
```

the netns is a containerd namespace concept, it not netns, event a cni
set netns for this, this is a tricky way, so remove the logic.

Fixes: #1692

Signed-off-by: Ace-Tang <aceapril@126.com>
2019-05-22 12:20:57 +08:00
lifupan
0d535f56e5 shimv2: kill a container return directly once the container termianted
According to CRI specs, kubelet will call StopPodSandbox()
at least once before calling RemovePodSandbox, and this call
is idempotent, and must not return an error if all relevant
resources have already been reclaimed. And in that call it will
send a SIGKILL signal first to try to stop the container, thus
once the container has terminated, here should ignore this signal
and return directly.

Fixes:#1672

Signed-off-by: lifupan <lifupan@gmail.com>
2019-05-22 04:14:12 +00:00
Julio Montes
e2d894d52a
Merge pull request #1717 from chavafg/topic/fix-static-checks
ci: Build kata-runtime before running static checks
2019-05-21 16:20:53 -05:00
Julio Montes
19288aab46 data/kata-collect-data: support kata containers snap
Use `kata-containers.runtime` that is the runtime binary, to
collect the data if the kata-runtime binary is not installed

fixes #1720

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-05-21 15:57:13 -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
Salvador Fuentes
0d98e248ff ci: Build kata-runtime before running static checks
We need to build kata-runtime to have the correct files
in place to be able to run the static checks script.

Fixes #1716.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-05-21 11:56:14 -05:00
Jose Carlos Venegas Munoz
5eded00f96 obs: build: enable fedora 30
Add fedora 30 to the list of packages to build.

Fixes: #523

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-21 11:46:16 -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
Graham Whaley
f4da3f585a
Merge pull request #1309 from nitkon/unitTestFail
virtcontainers: Set test qemu version for unit test
2019-05-21 09:45:22 +01:00
lifupan
5e1f5ca735 shimv2: fix the issue of passing the wrong container id
It should pass the container id instead of sandbox id.

Fixes:#1672

Signed-off-by: lifupan <lifupan@gmail.com>
2019-05-21 16:40:52 +08:00
James O. D. Hunt
7d754d9e2b
Merge pull request #520 from ganeshmaharaj/release-tag-retry
release: Allow re-tries of tagging and github releases
2019-05-21 07:57:27 +01:00
Fupan Li
100db8abdc
Merge pull request #1670 from xs3c/fix-vfio-hang
shim v2: Close vhostfd after vm get vhostfd
2019-05-21 14:53:26 +08:00
Nitesh Konkar
f7cc028891 vc:Execute TestQemuPPC64leMemoryTopology depending on qemu version
Set qemu major/minor version when
running unit test TestQemuPPC64leMemoryTopology
on ppc64le & execute the unit test accordingly.

Fixes: #1308

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-05-20 22:37:30 +05:30
James O. D. Hunt
0fce78ccf6
Merge pull request #1682 from jodh-intel/add-missing-docs
Add missing docs
2019-05-20 17:50:48 +01:00
Julio Montes
8ac4f61172
Merge pull request #482 from jodh-intel/add-missing-doc-link
docs: Added missing doc link
2019-05-20 07:25:31 -05:00
James O. D. Hunt
5c5b5185c2 docs: Added missing doc link
Added a link to the existing `how-to-use-virtio-fs-with-kata.md`.

Fixes #481.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-20 11:51:54 +01:00
James O. D. Hunt
09715c13d2 docs: Add missing newline at EOF
Add a newline at the end of the document, presumably missed off by
Emacs.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-20 11:48:54 +01:00
Xu Wang
3d4729d6b2
Merge pull request #1701 from bergwolf/debug-console
agent: fix agent debug console
2019-05-20 18:21:28 +08:00
James O. D. Hunt
f1005d08f4
Merge pull request #516 from jodh-intel/improve-docs
Improve docs
2019-05-20 09:47:28 +01:00
James O. D. Hunt
4d8d841641
Merge pull request #498 from jongwu/nic
kernel: disable pci shpc hotplug for arm64
2019-05-20 09:46:46 +01:00
Peng Tao
7381cd5b3f agent: fix agent debug console
We should not let shim or proxy read guest console socket if
agent debug console is set. Otherwise when we connect to it with
socat, it reads nothing since all output is read by the shim.

Fixes: #1700
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2019-05-17 19:59:18 -07:00
Archana Shinde
2744c94eb3
Merge pull request #1703 from nitkon/fixunittest
virtcontainers: Set correct Shmsize for ppc64le
2019-05-17 17:32:20 -07:00
Jose Carlos Venegas Munoz
b203fdb4a0 versions: Update cri-containerd yaml
Use only one version to install cri-contaienrd

- version could be a containerd version or a commit of the cri
repository.

Depends-on: github.com/kata-containers/tests#1400

Fixes: #1464

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2019-05-17 14:54:20 -05:00
Eric Ernst
e0dda36b5f
Merge pull request #1708 from chavafg/topic/machinetype-nemu
nemu-config: Add machine_type to config file
2019-05-17 12:12:55 -07:00
Ganesh Maharaj Mahalingam
6e8350f71b release: Allow re-tries of tagging and github releases
hub tool from github lets you show a particular tag that might exist in
the repostiory. Switching our tag checking logic to use that instead of
listing all tags and grepping for the one we want. For some reason the
existing grep logic always fails to return the right code and always
lands on the portion of the code to generate a new tag.

Fixes: #519
Signed-off-by: Ganesh Maharaj Mahalingam <ganesh.mahalingam@intel.com>
2019-05-17 10:19:21 -07:00
Salvador Fuentes
56ff870558
Merge pull request #1705 from devimc/topic/katautils/removeSystemdMasks
katautils: don't mask systemd units
2019-05-17 12:14:34 -05:00
Salvador Fuentes
6be5e5f182 nemu-config: Add machine_type to config file
nemu needs to be configured with:
`machine_type = "virt"` by default.

In addition, this commit removes
`machine_accelerators="virt"` which was added instead
of `machine_type` in a previous commit.

Fixes: #1707.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2019-05-17 11:29:14 -05:00
James O. D. Hunt
e4a5849b55 docs: Add missing links
Add missing links to other documents under suitable headings.

Fixes: #501.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:09 +01:00
James O. D. Hunt
577fd9fcc0 docs: Add missing READMEs
Created a skeletal set of README for the packaging areas that didn't
have them:

- Jenkins
- OBS
- QEMU
- static build tooling

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:09 +01:00
James O. D. Hunt
5a598841af docs: Add missing link to release process
Add a reference to the release.md file to make it more discoverable.

Fixes: #501.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:09 +01:00
James O. D. Hunt
dececa6ad3 docs: Add missing link to kernel configs doc
Add a link in the kernel README to the kernel configs README.

Fixes: #501.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:06 +01:00
James O. D. Hunt
4213fcba53 docs: Improve release README
Added backticks to commands and added a TOC.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:06 +01:00
James O. D. Hunt
e8ba16eec9 docs: Correct heading level
Fix the heading level in the release README.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:06 +01:00
James O. D. Hunt
0c520582eb docs: Remove redundant markdown
GFM doesn't require corresponding heading hashes at the end of line -
start of lines hashes are adequate.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:06 +01:00
James O. D. Hunt
7499b13030 docs: Add headings and TOC
Add missing heading names and a table of contents.

Also, folded the long lines to make them easier to edit and diff.

Fixes #501.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2019-05-17 16:29:06 +01:00
James O. D. Hunt
47d255a350
Merge pull request #1691 from bergwolf/virtiofsd
Add virtiofsd log and fix qemu hang due to virtiofsd vq setup failure
2019-05-17 16:26:52 +01:00
James O. D. Hunt
eb3cbdc976
Merge pull request #478 from jodh-intel/make-docs-non-interactive
docs: Advise use of non-interactive commands
2019-05-17 14:59:49 +01:00
Nitesh Konkar
1789b65c93 virtcontainers: Set correct Shmsize for ppc64le
Fix the test case TestGetShmSizeBindMounted by
setting the right ShmSize for ppc64le.

Fixes: #1702

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-05-17 18:54:28 +05:30
Graham Whaley
8f1e4860db
Merge pull request #518 from devimc/topic/snap/1.7.0
snap: release 1.7.0
2019-05-17 14:16:00 +01:00
Marco Vedovati
26174a1528 make: remove snap-xbuild from .PHONY target
This complements 7f7e258d

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-05-17 14:51:12 +02:00
Julio Montes
d66d855e08 katautils: don't mask systemd units
The systemd units and files that are not needed in Kata Containers,
are removed when the image is created, therefore we don't need to mask
them.

fixes #1704

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-05-17 07:38:11 -05:00
Peng Tao
10c14bcb38
Merge pull request #1694 from marcov/bump-go-version
versions: Update golang to 1.11.10
2019-05-17 19:34:08 +08:00
Marco Vedovati
1cd267af43 kata-pkgsync: Add OBS to Packagecloud sync tool
Add kata-pkgsync as the OBS to Packagecloud sync tool.

Fixes: #506

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2019-05-17 12:05:55 +02:00
Peng Tao
95d433c70b
Merge pull request #1679 from teawater/vmcache_defunct_proxy
kata_proxy: Open a special goroutine do cmd.Wait
2019-05-17 17:55:08 +08: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
Graham Whaley
ee0736b390
Merge pull request #480 from nitkon/master
documentation: Add travis CI for ppc64le
2019-05-17 09:56:27 +01:00
Graham Whaley
7e0a3cc401
Merge pull request #1697 from GabyCT/topic/updatecrioversion
versions: Update CRI-O version to 1.14.1
2019-05-17 09:31:08 +01:00
Nitesh Konkar
1b1ca703c1 documentation: Add travis CI for ppc64le
Enable travis on ppc64le

Fixes:  #479

Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
2019-05-17 10:44:24 +05:30