Commit Graph

15384 Commits

Author SHA1 Message Date
Clare Chen
b36b5a8f67 Contributors: Add Clare Chen to CONTRIBUTORS.md
Signed-off-by: Clare Chen <clare.chenhui@huawei.com>
2018-12-03 06:22:11 -05:00
Graham Whaley
0a7a4379dc
Merge pull request #967 from jodh-intel/add-containerd-shim-to-git-ignore
git: Add containerd-shim-kata-v2 to .gitignore
2018-12-03 09:28:48 +00:00
Mark Ryan
900f3a1f18
Merge pull request #74 from markdryan/s390-travis
Verify govmm builds on s390x
2018-12-03 10:16:09 +01:00
James O. D. Hunt
7093eec9c4 git: Add containerd-shim-kata-v2 to .gitignore
Hide the `containerd-shim-kata-v2` binary from `git status`.

Fixes: #966.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-12-03 08:57:46 +00:00
James O. D. Hunt
96ed6c59ee git: Sort .gitignore entries
Sort the contents of `.gitignore` into two groups: globs and actual
paths. This is more intuitive than a purely sorted list.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-12-03 08:56:21 +00:00
Mark Ryan
2fbc7e5ed2
Merge pull request #77 from caoruidong/contri
Contributors: Add my name
2018-12-03 09:21:01 +01:00
Ruidong Cao
b41939c6b4 Contributors: Add my name
Signed-off-by: Ruidong Cao <caoruidong@huawei.com>
2018-12-03 20:48:35 +08:00
NingBo
dab4cf1d70 qmp: Add tests
Test execute QMP command with error response.

Signed-off-by: NingBo <ning.bo9@zte.com.cn>
2018-12-03 14:40:26 +08:00
Jose Carlos Venegas Munoz
434fff890a rootfs_builder: Dont fail if GOPATH not defined.
Define GOPATH if is not set.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-11-30 10:45:19 -06:00
Jose Carlos Venegas Munoz
1bbf1e4106 rootfs: Allow use host repositories.
Instead of create a dnf repository allow the config from the host.

Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
2018-11-30 10:44:26 -06:00
Jose Carlos Venegas Munoz
08d52c53a4
Merge pull request #209 from marcov/golang-bump
rootfs: Bump golang version to 1.11.1
2018-11-30 10:16:07 -06:00
Mark Ryan
5ea6da1448 Verify govmm builds on s390x
This commit adds a single command to the travis script that checks
that the s390x build works.  We can't run the unit tests but at
least we can check that everything builds on this architecture.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2018-11-30 15:20:26 +01:00
Marco Vedovati
e2fb50411f obs-packaging: multi-arch kernel build support
Update the kernel package to allow building for multiple architectures with
a single set of sources.
Changes:
- Add kernel configs for all architectures
- Detect at runtime the correct target architecture and kernel
compressed image location. This is done  with the script kata-multiarch.sh

Note that debian control files still need to be updated to handle Multi-Arch,
so that they are not tied to the architecture on which
`linux-container/update.sh` is run.

Fixes: #262

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
2018-11-30 12:02:16 +01:00
Mark Ryan
dddf0f08ea
Merge pull request #68 from alicefr/s390x
qemu: Add s390x support
2018-11-30 11:12:17 +01:00
Alice Frosi
ee75813ad1 contributors: add my name
Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-11-30 10:14:45 +01:00
Alice Frosi
c80fc3b12f qemu: Add s390x support
The PR adds the s390x support. It sets the CCW devices and sets to false
all the devices in the mapping isVirtioPCI. It reimplements the functions
QemuNetdevParam and QemuDeviceParam to print an error message if the vhost-user
devices are used. It introduces a new function ExecuteNetCCWDeviceAdd for qmp
for the CCW devices.

Fixes: #37

Co-authored-by: Yash D Jain <ydjainopensource@gmail.com>
Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-11-30 10:13:28 +01:00
Mark Ryan
c5440a8819
Merge pull request #73 from markdryan/contributing
Update file headers , CONTRIBUTING.md and add CONTRIBUTORS.md
2018-11-30 10:04:14 +01:00
Mark Ryan
ca477a18b6 Update source file headers
This commit updates the headers in the Go source files to adhere
to the new guidelines in the CONTRIBUTING.md file.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2018-11-30 09:34:21 +01:00
Mark Ryan
e68e005697 Update the CONTRIBUTING.md
The CONTRIBUTING.md file is updated to provide a template for new
source files and to invite contributors to add themselves to the
CONTRIBUTORS.md file.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2018-11-30 09:34:21 +01:00
Mark Ryan
2b7db5473f Add the CONTRIBUTORS.md file
This file is a partial list of contributors to the Virtual Machine
Manager for Go project. To see the full list of contributors,
see the revision history in source control.

Contributors who wish to be recognized in this file should add
themselves (or their employer, as appropriate).

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
2018-11-30 09:34:20 +01:00
Mark Ryan
18948af4d4
Merge pull request #67 from BetaXOi/fix-mempath
qmp: fix mem-path properties for hotplug memory.
2018-11-30 08:49:21 +01:00
Frank Cao
6edb3618f6
Merge pull request #952 from alicefr/utils_linux_fix
virtcontainers: change uint32 to uint64 for ioctl
2018-11-30 09:56:39 +08:00
Jose Carlos Venegas Munoz
645728dc71
Merge pull request #256 from marcov/fix-versions
Update versions.txt content and detect versions misalignment
2018-11-29 15:21:50 -06:00
James O. D. Hunt
58575231bd
Merge pull request #950 from sboeuf/sboeuf/fix_docker_18_09
virtcontainers: Return the appropriate container status
2018-11-29 17:11:36 +00:00
Rob Bradford
7efe742ea8
Merge pull request #71 from alicefr/vsock_cid
qemu: change Context ID for Vsock to uint64
2018-11-29 16:40:38 +00:00
Alice Frosi
04ce4c05df virtcontainers: change uint32 to uint64 for ioctl
The PR changes the parameter args from uint32 to uint64 for ioctl function.
That leads to an endianess bug.

Fixes: #947

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-11-29 14:51:06 +00:00
Alice Frosi
b3b765cbe6 qemu: test Valid for Vsock for Context ID
Add test for the validation when the Context ID is larger than 32
bits

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-11-29 12:29:46 +00:00
Alice Frosi
3becff5f4e qemu: change of ContextID from uint32 to uint64
The correct type used by qemu and in kernel is uint64 and this leads to
an endianess problem with ioctl system call. See the issue
https://github.com/kata-containers/runtime/issues/947

Fixes: #70

Signed-off-by: Alice Frosi <afrosi@de.ibm.com>
2018-11-29 12:29:29 +00:00
James O. D. Hunt
fa19fd0c15
Merge pull request #949 from jodh-intel/check-factory-config
config: Check factory config
2018-11-29 10:46:51 +00:00
James O. D. Hunt
9654a403b0
Merge pull request #258 from bergwolf/fix-deploy-static
release: fix kata-deploy-binaries.sh install command
2018-11-29 09:34:46 +00:00
James O. D. Hunt
0bf29c8207 config: Check factory config
If VM factory templating is enabled (`enable_template=true`), error if
the configured image is not an `initrd=` one.

Also add a note to the config file explaining that a normal image cannot
be used - only initrd images are supported.

Fixes #948.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-11-29 08:33:15 +00:00
NingBo
f30fd1354a qmp: Output error detail when execute QMP command failed
Only get 'QMP command failed' error message now when execute QMP
command by 'executeCommandWithResponse' failed. This patch will
output more error detail.

Signed-off-by: NingBo <ning.bo9@zte.com.cn>
2018-11-29 16:32:14 +08:00
James O. D. Hunt
fe784c1e36 config: Create function to check config options
Moved the checking routines in `LoadConfiguration()` to a new
`checkConfig()` function for clarity.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-11-29 08:28:14 +00:00
James O. D. Hunt
70e4dc550a config: Move check code to end of LoadConfiguration
Move the VSOCK handling code higher up so that all the checking code is
gathered together at the end of `LoadConfiguration()`.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
2018-11-29 08:19:33 +00:00
Sebastien Boeuf
fa9b15dafe virtcontainers: Return the appropriate container status
When our runtime is asked for the container status, we also handle
the scenario where the container is stopped if the shim process for
that container on the host has terminated.

In the current implementation, we retrieve the container status
before stopping the container, causing a wrong status to be returned.
The wait for the original go-routine's completion was done in a defer
within the caller of statusContainers(), resulting in the
statusContainer()'s values to return the pre-stopped value.

This bug is first observed when updating to docker v18.09/containerd
v1.2.0. With the current implementation, containerd-shim receives the
TaskExit when it detects kata-shim is terminating. When checking the
container state, however, it does not get the expected "stopped" value.

The following commit resolves the described issue by simplifying the
locking used around the status container calls. Originally
StatusContainer would request a read lock. If we needed to update the
container status in statusContainer, we'd start a go-routine which
would request a read-write lock, waiting for the original read lock to
be released.  Can't imagine a bug could linger in this logic. We now
just request a read-write lock in the caller (StatusContainer),
skipping the need for a separate go-routine and defer. This greatly
simplifies the logic, and removes the original bug.

Fixes #926

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
2018-11-28 20:10:34 -08:00
NingBo
7da6a4c7c6 qmp: fix mem-path properties for hotplug memory.
The QMP command 'object-add' only has three arguments: 'qom-type'
'id' and 'props', thus 'mem-path' has to be saved in 'props'.
https://github.com/qemu/qemu/blob/stable-2.0/qapi-schema.json#L2958
https://github.com/qemu/qemu/blob/stable-2.12/qapi/misc.json#L1846

Signed-off-by: NingBo <ning.bo9@zte.com.cn>
2018-11-29 09:56:26 +08:00
Sebastien Boeuf
e06c8aafdc
Merge pull request #572 from hyperhq/shimv2
Implement containerd shim v2 API for Kata Containers
2018-11-28 16:37:10 +00:00
Peng Tao
a8fe5b1746 release: fix install command
The kata-shim Makefile is changed and we should not set libexecdir
anymore.

Fixes: #257

Signed-off-by: Peng Tao <bergwolf@gmail.com>
2018-11-28 20:46:44 +08:00
James O. D. Hunt
c2eea35b18
Merge pull request #865 from nitkon/kata-env
ppc64le: kata-env fails due to missing vendor field
2018-11-28 09:22:47 +00:00
James O. D. Hunt
7c44129614
Merge pull request #308 from jodh-intel/mention-warnings
docs: Add warnings to doc requirements doc
2018-11-28 08:48:12 +00:00
fupan
02f8b29837 containerd-shim-kata-v2: add building of shimv2 into Makefile
Add the Makefile target of building shimv2.

Fixes: #485

Signed-off-by: fupan <lifupan@gmail.com>
2018-11-28 14:32:25 +08:00
fupan
8199d10742 containerd-shim-kata: add unit test cases
Add unit test cases.

Signed-off-by: fupan <lifupan@gmail.com>
2018-11-28 14:32:25 +08:00
ZeroMagic
7951041eb0 containerd-shim-kata-v2: add the service Stats support
Add the Stats api support to get the container's
resouces statistic.

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
2018-11-28 14:32:25 +08:00
ZeroMagic
5cc016c8a2 containerd-shim-kata-v2: add the service Kill support
Add the Kill api support to send signal to a given
container process.

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
Signed-off-by: fupan.li <lifupan@gmail.com>
2018-11-28 14:32:25 +08:00
ZeroMagic
9ee53be986 containerd-shim-kata-v2: add the service Resume support
Add the Resume api support to resume a paused container.

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
2018-11-28 14:32:25 +08:00
ZeroMagic
8df33d34e8 containerd-shim-kata-v2: add the service Pause support
Add the Pause api support to pause a container running
in the pod.

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
2018-11-28 14:32:25 +08:00
ZeroMagic
cd321a3e6e containerd-shim-kata-v2: add the service ResizePty support
Add the ResizePty api support to resize the console.

Signed-off-by: ZeroMagic <anthonyliu@zju.edu.cn>
2018-11-28 14:32:25 +08:00
fupan
47326f566c containerd-shim-kata-v2: add the service Update support
Add the Update api support to update a running
process's resouce.

Signed-off-by: fupan <lifupan@gmail.com>
2018-11-28 14:32:25 +08:00
fupan
642231ba25 containerd-shim-kata-v2: add the service Shutdown support
Add the Shutdown api support to shutdown the shim.

Signed-off-by: fupan <lifupan@gmail.com>
2018-11-28 14:32:25 +08:00
fupan
87f591a697 containerd-shim-kata-v2: add the service Connect support
Add the Connect api to get the shim's info.

Signed-off-by: fupan <lifupan@gmail.com>
2018-11-28 14:32:25 +08:00