Commit Graph

4917 Commits

Author SHA1 Message Date
Hui Zhu
b0e5e12a08
Merge pull request #407 from lifupan/2.0-dev
add rust agent sandbox shared pid namespace support
2020-07-15 09:51:39 +08:00
Peng Tao
fbc6c52625
Merge pull request #406 from liubin/docs/add-link-to-setup-cri-pod-annotations
docs: add link to CRI Configuration for pods
2020-07-13 21:46:49 +08:00
Peng Tao
872ee35ca6
Merge pull request #404 from liubin/bugfix/403-add-monitor_address-to-gitignore
runtime: add monitor_address to .gitignore
2020-07-13 21:46:31 +08:00
fupan.lfp
c6e4d092d6 agent: sandbox shared pid namespace support
Add support shareProcessNamespace.
BTW, this commit only support shared pid namespace by
sharing the infrastructure pause container's pid namespace
with other containers, instead of creating a new pid
namespace different from pause container.

Fixes: #342

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-07-13 19:09:35 +08:00
fupan.lfp
afcf269c9b rustjail: fix the issue of missing join pid namespace
It shouldn't skip joining an container existed
pid namespace.

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-07-13 18:44:49 +08:00
bin liu
f3da6900c2 docs: add link to CRI Configuration for pods
To pass annotations from CRI to Kata containers, user must configure containerd if containerd is used.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-13 18:37:56 +08:00
bin liu
4291eb17fb runtime: add monitor_address to .gitignore
monitor_address may be committed to repo by accident

Fixes: #403

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-13 16:24:21 +08:00
Peng Tao
2bff7a16f5
Merge pull request #363 from liubin/feature/delete-sub-commands-332
runtime: delete unused sub-commands.
2020-07-13 11:06:27 +08:00
Peng Tao
dc0fa512b4
Merge pull request #398 from liubin/wip/add-pprof-interface
runtime: add pprof interface for shim
2020-07-13 11:03:07 +08:00
Peng Tao
866bc2f01d
Merge pull request #400 from liubin/wip/add-pod-overhead
runtime: add pod overhead metrics
2020-07-13 11:02:12 +08:00
bin liu
bbf8517050 runtime: add pprof interface for shim
Add new http interfaces to support pprof:

- /sandboxes
- /debug/vars
- /debug/pprof/
- /debug/pprof/cmdline
- /debug/pprof/profile
- /debug/pprof/symbol
- /debug/pprof/trace

Fixes: #397

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-10 13:05:25 +08:00
bin liu
0790ca4933 runtime: add pod overhead metrics
Add pod overhead metrics for CPU and memory to help with calculating sandbox overhead.

Fixes: #399

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-10 11:33:52 +08:00
Fabiano Fidêncio
b9f0f57f1a
Merge pull request #396 from abdasgupta/ppc64le-support
PPC64LE Support
2020-07-09 16:07:29 +02:00
Abhishek Dasgupta
ae83c96da9 Modifie to proper CPU architecture name for ppc64le.
Rust core::arch understand ppc64le as powerpc64 architecture
instead of powerpc64le architecture.

Signed-off-by: Abhishek Dasgupta <abdasgupta@in.ibm.com>
2020-07-09 06:05:33 -04:00
Abhishek Dasgupta
f404f4d959 Modified Makefile to pick up correct architecture name for ppc64le.
Makefile is determining the architecture by running uname command
which gives ppc64le as output. But rust toolchain target is available
with the name powerpc64le for ppc64le arch. So this change took care of that.

Signed-off-by: Abhishek Dasgupta <abdasgupta@in.ibm.com>
2020-07-09 06:05:33 -04:00
Fabiano Fidêncio
cdbba6ac4b agent: Make LIBC configurable
Currently the default LIBC used to build the agent is "musl". However,
"musl" is not preset in a big portion of the distros *and* "gnu" libc
just works as expected.

Knowing that, let's add the option to the one building the project to
simply do `make LIBC=gnu` instead of expected the person to go through
the Makefile and replace musl by gnu there.

Fixes: #369

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
2020-07-09 03:30:34 -04:00
Julio Montes
5a68e3490e
Merge pull request #360 from devimc/2020-06-29/forwardport/fixVFIOHotplug
[forwardport 2.0] create cgroup manager after creating the network
2020-07-08 13:26:39 -05:00
Julio Montes
2afbfcab99 virtcontainers: print a warning when the device to append is not supported
Print a warning message when the device to append to a QEMU VM is not
supported. This change is just to improve debuggability.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-08 09:36:36 -05:00
Julio Montes
919fc4cde5 virtcontainer/cgroup: create cgroup manager after creating the network
Create the cgroup manager once the network has been created, this way the
list of device will include the network VFIO devices attached to the sandbox,
when the physical enpoint is the network driver.

fixes #2774

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-08 09:36:28 -05:00
Julio Montes
a134c2e083 virtcontainers/network: Change signature of Enpoint Attach method
In order to use the device manager and receiver from the network enpoints,
the signature of the Attach method must change to revice a Sandbox instead of
a Hypervisor, this way devices can be added through the device manager API.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-08 09:32:49 -05:00
Julio Montes
9a9721c261 drivers: change BindDevicetoVFIO signature
BindDevicetoVFIO now returns the vfio path to the brand new vfio device bound

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-08 09:32:44 -05:00
Julio Montes
66219d164f device: support vfio cold plug
Depending on ColdPlug flag, cold or hot plug vfio devices. The VFIO device
won't be hot removed when such flag is false

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-08 09:32:39 -05:00
Julio Montes
3eb694c518 device: add ColdPlug flag
Add ColdPlug flag to DeviceInfo and DeviceState to identify whether a device
must be or was cold plugged

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-08 09:32:35 -05:00
bin liu
3cf8b470cd runtime: delete Stateful from SandboxConfig
Since all containers are started from shim v2, `Stateful` is not needed.

Fixes: #332

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-08 21:59:44 +08:00
bin liu
069505e2d5 runtime: delete unused sub-commands.
This PR delete codes not used anymore.

Fixes: #332

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-08 21:59:03 +08:00
Hui Zhu
e3a3818f7a
Merge pull request #388 from lifupan/2.0-dev
config: there is no need to check vhost-vosck for FC
2020-07-08 20:58:14 +08:00
Peng Tao
7eedc95de4
Merge pull request #384 from liubin/377/delete-agent-abstraction
runtime: remove agent abstraction
2020-07-08 17:12:08 +08:00
Hui Zhu
ce6cae0f77
Merge pull request #394 from liubin/393/handle-rpc-call-not-implemented
runtime: handle unimplemented RPC call by NotFound status code
2020-07-08 14:24:20 +08:00
Hui Zhu
6f1bfd25b6
Merge pull request #392 from liubin/391-fix-broken-links
runtime: fix wrong issue links
2020-07-08 14:23:45 +08:00
bin liu
a0a96db217 runtime: handle unimplemented RPC call by NotFound status code
For now, agent return status of NotFound when calling getOOMEvents, runtime should handle it correctly.

Fixes: #393

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-08 11:51:48 +08:00
bin liu
bd8f03a5ef runtime: remove agent abstraction
This PR will delete agent abstraction and use Kata agent as the only one agent.

Fixes: #377

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-08 10:07:40 +08:00
Fupan Li
350831b18b
Merge pull request #386 from liubin/2.0-add-metrics-docs
docs: add metrics design documents for Kata 2.0
2020-07-08 09:45:00 +08:00
Fupan Li
92697a197f
Merge pull request #297 from liubin/2-dev/metrics
Kata 2.0: add metrics for agent/guest/shim
2020-07-08 09:44:20 +08:00
bin liu
41c04648ad runtime: fix wrong issue links
Fix issue links in source codes.

Fixes: #391

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-07 16:35:43 +08:00
Fupan Li
57dfda9b3d
Merge pull request #365 from liubin/feature/delete-shim-364
runtime: clean up shim abstraction
2020-07-07 09:54:27 +08:00
Fupan Li
e1cbc60c13
Merge pull request #376 from liubin/368/delete-old-store
runtime: remove old store
2020-07-07 09:53:10 +08:00
fupan.lfp
83b2366560 config: there is no need to check vhost-vosck for FC
Since the FC used the hybrid vsock, there's no need
to check whether the vhost vsock suported by host.

Fixes: #387

Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
2020-07-06 16:02:37 +08:00
bin liu
d96b3063e0 docs: add metrics design documents for Kata 2.0
Add basic design for how metrics service works in Kata 2.0.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-06 11:04:48 +08:00
GabyCT
3e6e3a2cd4
Merge pull request #380 from devimc/2020-07-02/versions/revertQEMU5
versions: Revert "versions: update QEMU to 5.0.0"
2020-07-03 13:10:39 -05:00
Julio Montes
b28b850a79 versions: Revert "versions: update QEMU to 5.0.0"
This reverts commit 15af20b6da.

kubernetes test are failing randomly with QEMU 5.0.0, let's go back to
QEMU 4.1.1 and debug the failures with QEMU 5

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

fixes #379

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-03 16:12:31 +00:00
Julio Montes
5ff530371e tools: fix branch and runime repo
Kata 2.0 lives in `github.com/kata-containers/kata-containers`, so all scripts
should point to it.
Currently the branch for Kata 2.0 is 2.0-dev not master, then the branch envar
must be used instead of hardcoding `master` as default branch.

Signed-off-by: Julio Montes <julio.montes@intel.com>
2020-07-03 16:12:22 +00:00
Julio Montes
56b50785f0
Merge pull request #381 from bergwolf/oom
virtcontainers: GetOOMEvent should have no timeout
2020-07-03 07:18:34 -05:00
bin liu
24ea3f0127 virtcontainers: GetOOMEvent should have no timeout
So that waiter gets notified when oom happens.

Signed-off-by: bin liu <liubin0329@gmail.com>
2020-07-03 18:43:25 +08:00
Peng Tao
e35646cd38
Merge pull request #373 from likebreath/fix-248
agent: device: Allow "VmPath" to be used when adding block devices
2020-07-03 18:04:05 +08:00
bin liu
1b75daa00f runtime: add new command to collect metrics from Kata containers
Add a new command to collect metrics and return metrics to Prometheus.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-02 17:54:54 +08:00
bin liu
5200ac0678 runtime: remove old store
Remove old store for Kata 2.0.

Fixes: #368

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-02 16:12:05 +08:00
bin liu
186fed2a11 runtime: add implementation of GetMetrics
add implementation of `GetMetrics` for runtime.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-02 10:58:14 +08:00
bin liu
0c4c69de17 agent: add GetMetrics implementation
add implementation of `GetMetrics` for agent.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-02 10:42:23 +08:00
bin liu
9fd3e48c80 agent: add new pb message GetMetrics
Add new message and generated codes for `GetMetrics` between runtime and agent.

Signed-off-by: bin liu <bin@hyper.sh>
2020-07-02 10:41:17 +08:00
Bo Chen
4b01ec1f3c
Merge pull request #367 from bergwolf/rust-version
versions: specify rust version
2020-07-01 14:41:25 -07:00