GithubHelp home page GithubHelp logo

kata-containers / agent Goto Github PK

View Code? Open in Web Editor NEW
239.0 239.0 113.0 7.41 MB

Kata Containers version 1.x agent (for version 2.x see https://github.com/kata-containers/kata-containers). Virtual Machine agent for hardware virtualized containers

Home Page: https://katacontainers.io/

License: Apache License 2.0

Shell 1.92% Go 96.52% Makefile 1.08% Dockerfile 0.48%

agent's People

Contributors

amshinde avatar awprice avatar bergwolf avatar bpradipt avatar caoruidong avatar cedriccchen avatar chavafg avatar choury avatar dgibson avatar egernst avatar fidencio avatar flyflypeng avatar gabyct avatar gnawux avatar grahamwhaley avatar jcvenegas avatar jodh-intel avatar jongwu avatar katacontainersbot avatar laijs avatar lifupan avatar linzichang avatar marcov avatar mcastelino avatar nitkon avatar pennyzct avatar teawater avatar vbmade2000 avatar weizhang555 avatar zklei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agent's Issues

Add a Makefile

The repo needs a Makefile to build everything easily from a simple make command.

add grpc version API

We will need a version mechanism for agent gRPC. The most likely case we will want to handle is runtime upgrading and it reconnects to an old agent. While we can keep gRPC API backward compatibility, runtime needs to know this situation and take care not to send new API requests to old agents.

We can start by having a version check API first. And it can live with the health check service.

Add codecov.yml

Add codecov.yml file so that we can ignore some directories.

agent: Add missing nsenter import

It is mandatory that we import nsenter package, otherwise the init() function won't be able to spawn a new container.
This line has to be added to agent.go:

import (
        ...
        _ "github.com/opencontainers/runc/libcontainer/nsenter"
        ...
)

This requirement comes from the libcontainer documentation here: https://github.com/opencontainers/runc/blob/master/libcontainer/README.md
It explains that we need to add this import so that it will handle part of the container bootstrapping.
More details here: https://github.com/opencontainers/runc/blob/master/libcontainer/nsenter/README.md

change fmt.Errorf to "google.golang.org/grpc/status"

grpcStatus implements errors returned by gRPC. These errors are
serialized and transmitted on the wire between server and client, and allow
for additional data to be transmitted via the Details field in the status
proto. gRPC service handlers should return an error created by this
package, and gRPC clients should expect a corresponding error to be
returned from the RPC call.

protocol: grpc: Add new function ListProcesses()

@jodh-intel pointed out to me that we need a way to ask the agent about the processes running on one of its container. I think a simple way would be to only rely on ContainerID as the only argument of this function.
About what it should return, I am not sure what we should expect. IMO, we have two options:

  • Either we return an array of bytes, being the output of ps ... command being run on the agent
  • Or we agree on a global structure like this
type ProcessList struct {
        PID   string
        Ppid string
        CPU  string
        Cmd  string
        ...
}

that we would return, leaving the formatting of those data up to the runtime.

Require PRs to contain a "Signed-off-by" and a "Fixes #XXX" line

Enable checkcommits which will requires that all PRs have:

  • a Signed-off-by: line.
  • a Fixes #XXX comment where XXX is a github issue number.
  • Requires all commits to have a "sub-system" followed by a colon, followed by a brief description.
  • Requires a blank line after the subsystem.
  • Requires all commits to have a fuller description after the sub-system that will contain the Fixes ### and Signed-off-by: comments.

An example:

docs: Add a TOC to the README

Added a table of contents to the README to make the different sections
of the document easier to access. Blah blah blah. Moo? Foo!
Blah, blah, blah.

Fixes #123.

Signed-off-by: James O. D. Hunt <[email protected]>

Where,

  • docs is the "subsystem".

grpc.WithTimeout deprecated

// WithTimeout returns a DialOption that configures a timeout for dialing a ClientConn
// initially. This is valid if and only if WithBlock() is present.
// Deprecated: use DialContext and context.WithTimeout instead.

This method deprecated in current version of grpc-go in client.

Increase unit test coverage

The unit testing coverage should be increased with a first pass covering all the functions easily testable.

[RFC] Object ID

Hello,

I would like to propose that we enforce a design pattern when runtime creates objects through agent gRPC APIs -- for every object, it has a unique ID that is irrelevant to the actual implementation of the object and can identify the object within a certain scope.

To be specific, a container has a container id, a process has a process id, a storage has a storage id, a volume has a volume id, an interface has an interface id, a device has a device id, etc.

With above, we get a common pattern for all objects, instead of letting container/storage/volume/device have runtime designated IDs, while process/interface in turn uses their internal implementation related pid and MAC address as identifiers. And this would close the long-running discussions around #56 and #72

WDYT @sameo @sboeuf @WeiZhang555 @laijs @gnawux @mcastelino

stdout sometimes seems to be truncated

Sometimes it looks like the tail end of the output from a container is being truncated.

This is using an agent with fix #124 applied (actually using commit 827351a).

I noticed the problem when trying to run https://github.com/clearcontainers/tests/blob/master/metrics/time/launch_times.sh#L101, specifically that line that is looking for the kernel dmesg text: Freeing unused kernel memory. With kata, after a few iterations (4 in my recent test), the script fails to find the line.

Running dmesg by hand inside a kata container repeatedly, I can see that every now and then (say every 4 or 5 runs), the output of the container appears to be truncated. As an example, the tail of a good run looks like:

$ docker run --rm -ti --runtime=kata-runtime ubuntu bash
# dmesg
... <repeat as necessary>...
[    1.076596] tsc: Refined TSC clocksource calibration: 1799.973 MHz
[    1.076618] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x19f2102e78d, max_idle_ns: 440795264358 ns
[   27.164537] random: crng init done

and the tail of a bad run looks like:

[    0.180340] Write protecting the kernel read-only data: 10240k
[    0.180745] Freeing unused kernel memory: 2024K
[    0.181211] Freeing unused kernel memory: 220K
[    0.186141] systemd[1]: systemd 234 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK

As a sanity check I did this in the container:

for i in $(seq 1 20); do
dmesg | wc
done

and that appears fine, which leads me to think the problem is in the stdout transport to the host.

One more data point. When my test script failed, and I dumped the dmesg text that I did get to check why it failed, it looked like maybe some of the dmesg had gotten 're-ordered', and I see output like:

^[[32m[    0.200145] ^[[0m^[[33mrandom^[[0m: systemd: uninitialized urandom read (16 bytes read)
^[[32m[    0.200172] ^[[0m^[[33mrandom^[[0m: systemd: uninitialized urandom read (16 bytes read)
^[[32m[    0.200190] ^[[0m^[[33mrandom^[[0m: systemd: uninitialized urandom read (16 bytes read)
^[[32m[    0.216145] ^[[0m^[[33msystemd-journald[118]^[[0m: Received request to flush runtime journal from PID 1
^[[32m[    0.881863] ^[[0m^[[33mpci 0000:00:03.0^[[0m: PCI bridge to [b after 0 usecs
^[[32m[    0.177057] ^[[0mcalling  xfrm6_mode_tunnel_init+0x0/0x17 @ 1
^[[32m[    0.177059] ^[[0minitcall xfrm6_mode_tunnel_init+0x0/0x17 returned 0 after 0 usecs

(sorry about the ANSI noise) - where you can see the timestamps are mis-ordered. This may or may not be related... something to check if/after we've found the truncation issue maybe?

Follow runc usage of libcontainer

exec should be available before StartContainer link runc exec
And stdio should be connectable.

We'd better to follow the way that runc calls into libcontainer, unless there is a strong demand with convictive reasons.

Add online Mem

In grpc onlineCPUMem(), it just online CPU. Is it a bug?

		for _, file := range files {
			matched, err := regexp.MatchString(resource.regexpPattern, file.Name())
			if err != nil {
				return err
			}

			if !matched {
				continue
			}

			cpuOnlinePath := filepath.Join(sysfsCPUOnlinePath, file.Name(), "online")
			ioutil.WriteFile(cpuOnlinePath, []byte("1"), 0600)
		}

Get exec_id from the runtime

Instead of generating exec IDs (or process IDs) from the agent, we will rely on the runtime to make things simpler.

Handle Storage options as a combination of flags and options

The Options field inside Storage structure is going to be used both for passing some flags and data for the mount() system call. The semantic behind this will be to check if an option from the list matches with a flag from a list of flags defined in the agent API. In case it does not match with any flag, we will consider the option as a real option that should be used as data.

Get data race with mock server when test shim

kata-containers/shim$ make test
go build -o kata-shim
go test -v -race
=== RUN   TestNewShimAgent
--- PASS: TestNewShimAgent (0.01s)
=== RUN   TestAddContainer
proto: no coders for grpc.User
proto: no encoder for User grpc.User [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Rlimits []grpc.POSIXRlimit [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Mounts []grpc.Mount [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Prestart []grpc.Hook [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Poststart []grpc.Hook [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Poststop []grpc.Hook [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for UIDMappings []grpc.LinuxIDMapping [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for GIDMappings []grpc.LinuxIDMapping [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Devices []grpc.LinuxDeviceCgroup [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for WeightDevice []grpc.LinuxWeightDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleReadBpsDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleWriteBpsDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleReadIOPSDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleWriteIOPSDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for HugepageLimits []grpc.LinuxHugepageLimit [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Priorities []grpc.LinuxInterfacePriority [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Namespaces []grpc.LinuxNamespace [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Devices []grpc.LinuxDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Syscalls []grpc.LinuxSyscall [GetProperties]
--- PASS: TestAddContainer (0.01s)
=== RUN   TestPipe
--- PASS: TestPipe (0.01s)
=== RUN   TestNewShim
--- PASS: TestNewShim (0.01s)
=== RUN   TestShimOps
INFO[0000] Error getting size                            error="inappropriate ioctl for device" name=kata-shim pid=11790
INFO[0000] Error getting size                            error="inappropriate ioctl for device" name=kata-shim pid=11790
==================
WARNING: DATA RACE
Write at 0x00c42030a8a0 by goroutine 33:
  runtime.mapassign_fast32()
      /home/teawater/go/src/runtime/hashmap_fast.go:422 +0x0
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).WaitProcess()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:183 +0x18e
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_WaitProcess_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1220 +0x339
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Previous read at 0x00c42030a8a0 by goroutine 97:
  runtime.mapaccess1_fast32()
      /home/teawater/go/src/runtime/hashmap_fast.go:12 +0x0
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).checkExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:88 +0x3f2
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).processExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:97 +0x5f
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).ReadStderr()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:209 +0x7c
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_ReadStderr_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1274 +0x336
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Goroutine 33 (running) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777

Goroutine 97 (finished) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777
==================
==================
WARNING: DATA RACE
Write at 0x00c4201754b8 by goroutine 33:
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).WaitProcess()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:183 +0x1a4
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_WaitProcess_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1220 +0x339
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Previous read at 0x00c4201754b8 by goroutine 97:
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).checkExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:88 +0x408
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).processExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:97 +0x5f
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).ReadStderr()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:209 +0x7c
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_ReadStderr_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1274 +0x336
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Goroutine 33 (running) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777

Goroutine 97 (finished) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777
==================
==================
WARNING: DATA RACE
Write at 0x00c4202fb5f0 by goroutine 33:
  runtime.mapassign_faststr()
      /home/teawater/go/src/runtime/hashmap_fast.go:598 +0x0
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).WaitProcess()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:186 +0x2d9
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_WaitProcess_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1220 +0x339
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Previous read at 0x00c4202fb5f0 by goroutine 97:
  runtime.mapaccess1_faststr()
      /home/teawater/go/src/runtime/hashmap_fast.go:208 +0x0
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).checkExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:81 +0x2cf
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).processExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:97 +0x5f
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).ReadStderr()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:209 +0x7c
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_ReadStderr_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1274 +0x336
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Goroutine 33 (running) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777

Goroutine 97 (finished) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777
==================
==================
WARNING: DATA RACE
Write at 0x00c4202c2be8 by goroutine 33:
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).WaitProcess()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:186 +0x2ef
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_WaitProcess_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1220 +0x339
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Previous read at 0x00c4202c2be8 by goroutine 97:
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).checkExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:81 +0x2e5
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).processExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:97 +0x5f
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).ReadStderr()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:209 +0x7c
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_ReadStderr_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1274 +0x336
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Goroutine 33 (running) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777

Goroutine 97 (finished) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777
==================
==================
WARNING: DATA RACE
Read at 0x00c4202fb5f0 by goroutine 96:
  runtime.mapaccess1_faststr()
      /home/teawater/go/src/runtime/hashmap_fast.go:208 +0x0
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).checkExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:81 +0x2cf
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).processExist()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:97 +0x5f
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).ReadStdout()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:201 +0x7c
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_ReadStdout_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1256 +0x336
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Previous write at 0x00c4202fb5f0 by goroutine 33:
  runtime.mapassign_faststr()
      /home/teawater/go/src/runtime/hashmap_fast.go:598 +0x0
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver.(*mockServer).WaitProcess()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/mockserver/mockserver.go:186 +0x2d9
  github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc._AgentService_WaitProcess_Handler()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go:1220 +0x339
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).processUnaryRPC()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:900 +0xf87
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleStream()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:1122 +0x14a6
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1.1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:617 +0xac

Goroutine 96 (running) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777

Goroutine 33 (running) created at:
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams.func1()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:615 +0xb8
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).operateHeaders()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:381 +0x14ca
  github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport.(*http2Server).HandleStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/transport/http2_server.go:413 +0x676
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).serveStreams()
      /home/teawater/gopath/src/github.com/kata-containers/shim/vendor/google.golang.org/grpc/server.go:613 +0x1d1
  github.com/kata-containers/shim/vendor/google.golang.org/grpc.(*Server).handleRawConn()
      /home/teawater/gopath/src/github.com/kata-

containers/shim/vendor/google.golang.org/grpc/server.go:574 +0x777
==================
INFO[0000] copy stdout failed                            error="rpc error: code = Unknown desc = container foobar does not exist" name=kata-shim pid=11790
INFO[0000] copy stderr failed                            error="rpc error: code = Unknown desc = container foobar does not exist" name=kata-shim pid=11790
--- FAIL: TestShimOps (0.03s)
	testing.go:699: race detected during execution of test
FAIL
exit status 1
FAIL	github.com/kata-containers/shim	0.090s
Makefile:5: recipe for target 'test' failed
make: *** [test] Error 1

Update protocol to use generic devices vs storage

Today we assume all devices are storage devices

https://github.com/kata-containers/agent/blob/master/protocols/grpc/agent.proto#L52

message CreateContainerRequest {
	string container_id = 1;
	StringUser string_user = 2;
	repeated Storage storages = 3;
	Spec OCI = 4;
}

This has to be replaced by a generic device definition.

We need to specify

  • device types
  • for each device type
  • device identification (PCI, /dev/xyz, ...) as it shows up in the VM
  • device identification as it show up with the container (predicted name)

We should also manage the devices directly in the agent and try not to rely on udev etc. This will allow us to use the agent as init.

Fix the agent to make it functional

We need to fix a few things on the agent code so that we can run our first container using it. This issue covers several tiny fixes. More details on the commits of the PR covering the implementation.

add health check in the api

The guest/agent may stall on some cases or panic. but the vm look normal out side.
health check can be used to check this situation. In hyperstart runtime call the Version()
api periodically. In kata, we also need such mechanism.

grpc health check might help.

[RFC] Always create sandbox init process and knobs for joining

In hyperstart, the pod_init process has its own net/pid/uts/ipc ns.

And in kata, these namespaces are also essential.

Net ns for the sandbox should be always created since the container's
network should be isolated from the vm's initial network to
avoid messing.

Pid ns for the sandbox should be always created since the containers
always join this ns. We can use new pid ns for each container,
but in most cases, they are shared the same sandbox init pid ns.

Uts ns for the sandbox should be always created since the hostname
is set in it without mess it up with the vm's initial UTS.

Ipc ns for the sandbox should be always created since the containers
always join this ns. We can use new ipc ns for each container,
but in most cases, they are shared the same sandbox init ipc ns.

So sandbox init process should be always created
in its own net/pid/uts/ipc ns and let the later containers
join in. A pr is required for it

In above info, we know that container should always join the net/uts ns.
And container should NOT use the guest's initial pid/ipc ns.
But container can use the shared or private pid/ipc ns.
We have knob for pid ns. Should we add a knob for the ipc ns?
Or we can make it always to be one of shared or private.

Convert the OCI specification into libcontainer configuration

Instead of hardcoding some values of the libcontainer configuration, this should be obtained by a conversion from the OCI Spec received from CreateContainer(). If some values are not provided by the spec, but needed to get the agent working properly, they should be set from a set of default values.

fix dep warning and prune unneeded code

The newest dep will automatically do pruning.
The newest dep complaint it:

Warning: the following project(s) have [[constraint]] stanzas in Gopkg.toml:

  โœ—  github.com/golang/protobuf

However, these projects are not direct dependencies of the current project:
they are not imported in any .go files, nor are they in the 'required' list in
Gopkg.toml. Dep only applies [[constraint]] rules to direct dependencies, so
these rules will have no effect.

Either import/require packages from these projects so that they become direct
dependencies, or convert each [[constraint]] to an [[override]] to enforce rules
on these projects, if they happen to be transitive dependencies,

Missing APIs

hyperd depends on such hyperstart APIs:

  • portmapping
    • Configured in CreateSandbox to setup portmapping
  • ReadFile/WriteFiles
    Read/Write from a container, it is unused now.
    • update /etc/hosts
  • hyperstart-exec
    execute a process in the vm rather than in container. currently used for:
    • update portmapping
    • ipvs operations
    • hyperctl exec --vm peek/do something inside the vm. debug only.

In one words, more network APIs needs to be added and cover the above requirements.
(except the case for hyperctl exec --vm, but do we need to add some debug facilities for debug?)

Does it need to enable setting sandbox(pod) level sysctl?

runv tries to set sysctl "vm.overcommit_memory"="1" for the sandbox, so it adds this configure for each container. However, libcontainer complains about it.

agent.CreateContainer() failed: rpc error: code = Unknown desc = sysctl "vm.overcommit_memory" is not in a separate kernel namespace

Handle storage (mount) flags through the list of options

The protocol defines a list of options through the Storage structure. This list should be processed this way:
If we can find a corresponding flag matching an option, this option will be considered as a mount() flag.
Otherwise, it will be (by default) considered as an option that should be added to the data parameter of the mount().

grpc server warnings

I'm seeing proto warnings when an gRPC client first sends request to the server. Looks like it is related to gogoproto's gogoproto.nullable attribute. All these warning fields are attached with gogoproto.nullable attribute in oci.proto.

proto: no coders for grpc.User
proto: no encoder for User grpc.User [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Rlimits []grpc.POSIXRlimit [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Mounts []grpc.Mount [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Prestart []grpc.Hook [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Poststart []grpc.Hook [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Poststop []grpc.Hook [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for UIDMappings []grpc.LinuxIDMapping [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for GIDMappings []grpc.LinuxIDMapping [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Devices []grpc.LinuxDeviceCgroup [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for WeightDevice []grpc.LinuxWeightDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleReadBpsDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleWriteBpsDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleReadIOPSDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for ThrottleWriteIOPSDevice []grpc.LinuxThrottleDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for HugepageLimits []grpc.LinuxHugepageLimit [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Priorities []grpc.LinuxInterfacePriority [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Namespaces []grpc.LinuxNamespace [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Devices []grpc.LinuxDevice [GetProperties]
proto: no slice oenc for *reflect.rtype = []*reflect.rtype
proto: no encoder for Syscalls []grpc.LinuxSyscall [GetProperties]

@sameo any thoughts?

Allow agent serve on unixsock and other network protocol

Allowing agent serve on unixsock, so that the agent can be run without the need of virtualization, it is at least important for testing.

Allowing agent serve on tcp and other network protocol, so that we can directly use VMs from public cloud as sandboxes.

Add seccomp support

In order to enable support for seccomp inside the VM, here is what we need:

/usr/bin/cc-agent: error while loading shared libraries: libseccomp.so.2: cannot open shared object file: No such file or directory

make agent itself as subreaper

  • A loop that calls syscall.Wait() to reap processes
    And to collect processes' exitcode
  • Make itself as PR_SET_CHILD_SUBREAPER
    It is essential when the agent is not launched as the vm's init process.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.