Commit Graph

2992 Commits

Author SHA1 Message Date
bin liu
9b9f2b2ff0 agent: porting https://github.com/kata-containers/agent/pull/616
this PR will port the original PR to kata 2.0.

Signed-off-by: bin liu <bin@hyper.sh>
2020-05-26 18:17:54 +08:00
Fupan Li
83f116b483
Merge pull request #228 from bergwolf/makefile
fix build with go 1.14
2020-05-26 15:45:36 +08:00
Peng Tao
97909ea2b9 gitignore: do not ignore Cargo.lock
We already include it in the repo.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-05-26 00:24:45 -07:00
Peng Tao
f53901ad43 makefile: add more build targets
To make it easy to build and test.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-05-25 23:30:42 -07:00
Peng Tao
4fdb4cffd5 runtime: update vendor/modules.txt
go 1.14 requires it to match go.mod and exposes a backtrace with
slightly difference.

Fixes: #227
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-05-25 23:30:42 -07:00
Peng Tao
6bc69760c0 vendor: move ttrpc proto code out of vendor
We do not really depend on the go agent generated grpc code any more.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-05-25 23:30:42 -07:00
Peng Tao
f7b941b6bf
Merge pull request #231 from lifupan/fix_ttrpc
Fix ttrpc changes caused building issues
2020-05-26 14:29:56 +08:00
fupan.lfp
555f620653 agent: hardcode the Cargo.lock file
Hardcode the Cargo.lock file to prevent dependencies
change which would cause some compatible issues.

Fixes: #230

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-05-26 11:39:07 +08:00
fupan.lfp
08e3d259ca agent: fix the issue of building error with latest ttrpc
Since the ttrpc upgraded with async supported, which isn't
compatible with current agent, thus it's better to change
the dependency to a stable branch.

Fixes: #229

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-05-26 11:14:39 +08:00
James O. D. Hunt
478dfa4b52
Merge pull request #216 from lifupan/ttrpc_runtime
switch to Ttrpc for runtime
2020-05-11 09:26:11 +01:00
fupan.lfp
1d6e7ac405 change the protocols from grpc to ttrpc
Switch protocols from grpc to ttrpc

Fixes: #148

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-05-09 17:39:34 +08:00
fupan.lfp
010b7a9fba vendor: add the ttrpc protos
add the ttrpc protocol files

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-05-09 15:36:43 +08:00
fupan.lfp
663c7e7921 vendor: update the required vendors
update the required vendors

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-05-08 20:38:12 +08:00
Yang Bo
84e389d9d1
Merge pull request #210 from bergwolf/travis
travis: enable linux-ppc64le
2020-05-07 16:35:49 +08:00
Peng Tao
6d129546e3 travis: enable linux-ppc64le
Use build jobs to enable it.

Fixes: #209
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-05-06 03:03:07 -07:00
Peng Tao
cb6b0e1370
Merge pull request #204 from chavafg/topic/merge-osbuilder
Merge osbuilder/1.11.0-rc0 into kata-containers 2.0-dev branch
2020-05-06 11:02:06 +08:00
Salvador Fuentes
629cc0ae8d rootfs-builder: remove EulerOS
EulerOS does not work with rust agent.

further info:
https://github.com/kata-containers/osbuilder/issues/387

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-30 08:27:25 -05:00
Salvador Fuentes
586d26480c rootfs-builder: Add license header to rootfs_lib_template.sh
Add license header to `tools/osbuilder/rootfs-builder/template/rootfs_lib_template.sh`

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-30 08:20:46 -05:00
Julio Montes
14a01d8eb5
Merge pull request #205 from bergwolf/travis
runtime: import new path
2020-04-30 07:23:10 -05:00
Peng Tao
e90c5d45b3 runtime: build with vendor
So that we don't have to download dependencies.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 19:25:40 -07:00
Peng Tao
cd9e309f63 travis: enable runtime root required UTs
We check both root and non-root cases.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 18:39:03 -07:00
Peng Tao
06b3f313a2 shimv2: do not reset service config
Only load runtime config when it is not set.
We do not expect a service's runtime config to change while
it is running.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 18:39:03 -07:00
Peng Tao
6de95bf36c gomod: update runtime import path
To use the kata-containers repo path.

Most of the change is generated by script:
find . -type f -name "*.go" |xargs sed -i -e \
's|github.com/kata-containers/runtime|github.com/kata-containers/kata-containers/src/runtime|g'

Fixes: #201
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 18:39:03 -07:00
Salvador Fuentes
11c3d81f68 docs: fix markdown check issues
- Removes `CODE_OF_CONDUCT.md` and `CONTRIBUTING.md` from osbuilder
directory.
- Fixes a reference from `image-builder/README.md` to
`rootfs-builder/README.md`
- Updates the main `README.md` making a reference to the local
`tools/osbuilder/README.md`

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-29 17:51:44 -05:00
Salvador Fuentes
21c830c7da repo: Merge osbuilder/1.11.0-rc0 into kata-containers/2.0-dev
Merge osbuilder into kata-containers for 2.0 development cycle.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-29 16:49:13 -05:00
Salvador Fuentes
715d342519 osbuilder: move code into tools directory
move all osbuilder files into `tools` directory to be able
to merge this into kata-containers repo.

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-29 16:45:00 -05:00
Jose Carlos Venegas Munoz
66fe1d2a69
Merge pull request #199 from bergwolf/runtime-1.11.0-rc0
merge Runtime 1.11.0 rc0
2020-04-29 08:24:20 -05:00
Peng Tao
241d52d4fa travis: enable runtime
Run make and test for both agent and runtime.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 02:44:12 -07:00
Peng Tao
359b78c1c9 runtime: fix cli non-root ci
It turns out kata check needs root privilege to
call modprobe otherwise it fails.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 02:40:33 -07:00
Peng Tao
a5589196ce runtime: fix TestMainBeforeSubCommands
It is simply wrong to test kata-check within before sub commands
as it is NOT before at all. Besides it causes errors if kata is
not installed.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-29 02:40:33 -07:00
Peng Tao
3b5768e6e0 runtime: remove unneeded test conf
We don't really use them anymore.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 20:52:12 -07:00
Peng Tao
4fceb03d96 markdown: fix markdown checke failures
Pass markdown checker.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:50:59 -07:00
Peng Tao
93b72558ad runtime: enable make file
go test needs explicit -mod=vendor argument.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:50:45 -07:00
Peng Tao
426a9cab6e runtime: fix agnet ut
We should not use a plain unix socket reader to act as grpc
server. Place a really mock grpc server instead.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:50:37 -07:00
Peng Tao
e540648950 vendor: move to go mod
Get rid of go dep finally ;)

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:50:29 -07:00
Peng Tao
98e3e99843 Merge remote-tracking branch 'runtime/1.11.0-rc0' into runtime-1.11.0-rc0
Merge runtime 1.11.0-rc0 in.

Fixes: #192
Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:49:18 -07:00
Peng Tao
a02a8bda66 runtime: move all code to src/runtime
To prepare for merging into kata-containers repository.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
2020-04-27 19:39:25 -07:00
Yang Bo
7468750442
Merge pull request #177 from lifupan/upstream_ttrpc
Upstream ttrpc
2020-04-27 20:14:17 +08:00
fupan.lfp
3ea23a9a5d add license headers to proto files
add license headers to proto files

Fixes: #148

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-04-22 22:12:38 +08:00
lifupan
a7041c27dc agent: switch from grpc to ttrpc as agent protocol
switch from grpc to ttrpc
Fixes: #148

Signed-off-by: lifupan <lifupan@gmail.com>
2020-04-22 22:12:18 +08:00
Salvador Fuentes
3b98b259b4
Merge pull request #2626 from chavafg/1.11.0-rc0-branch-bump
# Kata Containers 1.11.0-rc0
2020-04-17 20:14:34 -05:00
Archana Shinde
c95d09a34d
Merge pull request #181 from chavafg/1.11.0-rc0-branch-bump
# Kata Containers 1.11.0-rc0
2020-04-17 14:55:51 -07:00
Salvador Fuentes
eb128f8558
Merge pull request #444 from chavafg/1.11.0-rc0-branch-bump
# Kata Containers 1.11.0-rc0
2020-04-17 16:25:20 -05:00
Salvador Fuentes
21711eea08 release: Kata Containers 1.11.0-rc0
- makefile: Make SELinux support configurable
- clh: Boot from persistent memory device
- config: Add scsi_mod.scan=none for virtio-scsi
- katautils: Use config paths set during the build
- version: Update kernel to lts 5.4.32
- clh: virtiofs: Add no_posix_lock option
- versions: Switch to virtio-fs-dev branch for kernel
- v2: Open log fifo with `RDWR` instead of `WRONLY`
- qemu-ppc64le: Switch off large decrementer capability
- versions: Update go to 1.13.9
- qemu_ppc64le: EXpose fs support explicitly
- qemu: Don't crash if virtiofsd path is non existent
- Add SELinux support for running VM Confinement
- clh:  Implment capabilities
- Update go to v1.13.8
- Makefile: Allow change default hypervisor via env var
- clh: Report warning when requested vCPUs exceeds maxVCPU allowed
- clh: Enable memory hotplug
- virtcontainers: check PCI resource format before using it
- Support persistent memory volumes
- versions: Update containerd commit
- virtcontainers: Don't create vfio devices in the guest
- shimv2: move container rootfs mounted flag to container level
- AArch64: officially enable firecracker v0.21.0 on AArch64
- clh: add vfio support

d78ffd65 makefile: Make SELinux support configurable
7aa31685 clh: Boot from persistent memory device
e8fc25a7 version: Update clh to master
bf9758bf katautils: Use config paths set during the build
8c850d9e config: Add scsi_mod.scan=none for virtio-scsi
07d0a4f0 version: Update kernel to lts 5.4.32
ab8050c5 kata_agent: Don't use dax if virtio_fs_cache is 0
6218b2a5 kata_agent: Remove sharedDirVirtioFSOptions
95ccc0f7 agent: Use "virtiofs" instead of "virtio_fs"
4c1cacd3 versions: Switch to virtio-fs-dev branch for kernel
8e0f891e v2: Open log fifo with `RDWR` instead of `WRONLY`
afbd03cf qemu-ppc64le: Switch off large decrementer capability
432f9bea clh: virtiofs: Add no_posix_lock option
0294fcb9 versions: Update go to 1.13.9
fd625b3f qemu: Don't crash if virtiofsd path is non existent
5eec8bdf qemu_ppc64le: EXpose fs support explicitly
e4eb553d virtcontainers: Add SELinux support for running VM Confinement
39e354f6 clh: Implement capabilities
0a1ffc1d types: Make FS sharing disable by default
669b6e32 clh: Report warning when requested vCPUs exceeds maxVCPU allowed
7997218c Makefile: Allow change default hypervisor via env var
aab82f67 clh: Add memory hotplug
e62a8aa9 versions: Update containerd commit
2f948738 clh: Use MemUnit to create VM
b6a7d8d6 utils: Add memory unit abstraction
5e7d2538 clh: add vmInfo method
ebb8fd57 versions: Update clh to latest master
4d2574a7 virtcontainers: Don't create vfio devices in the guest
3b53114a virtcontainers: improve algorithm to check Large bar devices
7aff5466 virtcontainers: check PCI resource format before using it
d0a730c6 shimv2: move container rootfs mounted flag to container level
d60902a9 FC: change minimum supported version of Firecracker to v0.21.1
aadf8c4a AArch64: enable firecracker v0.21.1 on AArch64
44e23493 FC: Fix error of overlong firecracker API unix socket
c3bafd57 FC: Change default API socket path
2945bcd7 FC: Removed redundant `--seccomp-level` jailer parameter
d2cae59e FC: Removed redundant `RescanBlockDevice` action
37b91b33 FC: Remove `logger.options`
2c310fec virtcontainers: handle persistent memory volumes
434b3025 virtcontainers: hotplug block drives that are pmem devices as nvdimm
84e0ee13 virtcontainers: reimplement `createBlockDevices`
abbdf078 virtcontainers: add Pmem attribute to BlockDrive
ee941e5c virtcontainers: Implement function to get the pmem DeviceInfo
9ff44dba virtcontainers: implement function to get the backing file
0a4e2edc virtcontainers: move GetDevicePathAndFsType to utils_linux
2c7f27ec vendor: update govmm
f61eca89 clh: Add comments around clh api
6a4e667f virtiofsd: Check if PID is valid
3251beaa version: Update clh to master
c5184641 clh: Add vfio support
4d034b1e versions: update go to v1.14

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-17 17:51:39 +00:00
Salvador Fuentes
b7d1e30c9f release: Kata Containers 1.11.0-rc0
- tests: deleting stale test results when tests failed
- image_builder: Reduce the boundary mb for reducing image size on arm64
- initrd-builder: Don't error if run as non-root
- s390x: Skip rust for s390x
- image_builder: Force mount_dir to be created in /tmp

c29dbae tests: deleting when tests failed
2ac3090 s390x: Skip rust for s390x
9665563 image_builder: Force mount_dir to be created in $TMPDIR
6cae294 initrd-builder: Don't error if run as non-root
005c62a image_builder: Reduce the boundary mb for reducing image size on arm64

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-17 17:51:16 +00:00
Salvador Fuentes
63d9a8696f release: Kata Containers 1.11.0-rc0
- Fix potentianl crash
- sandbox: fix the issue of missing setting hostname
- unify the rustjail's log to contain container id and exec id
- Refactor the way of creating container process

ba3c732 grpc: fix the issue of potential crashes
32431d7 rpc: fix the issue of kill container process
986e666 sandbox: fix the issue of missing setting hostname
7d9bdf7 grpc: Fix the issue passing wrong exec_id to exec process
9220fb8 rustjail: unify the rustjail's log to contain container id and exec id
c1b6838 rustjail: refactoring the way of creating container process
e56b10f rustjail: remove the unused imported crates
ded27f4 oci: add Default and Clone to oci spec objects
7df8ede rustjail: replace protocol spec with oci spec

Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
2020-04-17 17:51:05 +00:00
Fabiano Fidêncio
33e5ab1bf6
Merge pull request #2624 from andreabolognani/feature-selinux
makefile: Make SELinux support configurable
2020-04-17 15:04:04 +02:00
Andrea Bolognani
d78ffd653d makefile: Make SELinux support configurable
SELinux support requires libselinux to be available, but that's
not the only factor: for example, Fedora 31 has libselinux but not
a version of selinux-policy that knows about Kata containers, so
enabling SELinux support by default in that case causes usability
issues.

Another issue with the current implementation is that, when
libselinux is absent, SELinux support will be quietly disabled,
which might not be what the user (or packager) intended.

To solve both problems, introduce the new FEATURE_SELINUX user
variable. This variable takes one of three values:

  * check (default): keep the current behavior;

  * yes: enable SELinux support, erroring out if libselinux is
         not present on the system;

  * no: disable SELinux support.

In the future we might want to formalize support for optional
build-time features, but for now this will do.

Fixes: #2623

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2020-04-17 12:03:22 +02:00
Julio Montes
018348064e
Merge pull request #2621 from likebreath/boot_from_pmem
clh: Boot from persistent memory device
2020-04-16 07:33:07 -05:00
Julio Montes
9c8b7c3197
Merge pull request #2561 from justin-he/scsi_async
config: Add scsi_mod.scan=none for virtio-scsi
2020-04-16 07:28:48 -05:00