Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

A draft commit of Kata support #727

Open
wants to merge 53 commits into
base: kata-support
Choose a base branch
from

Conversation

lifupan
Copy link
Member

@lifupan lifupan commented Jun 15, 2018

No description provided.

@Jimmy-Xu
Copy link
Contributor

Can one of the admins verify this patch?

func(sb *hypervisor.Vm) error {
return sb.KillContainer(id, syscall.Signal(sig))
func(sb *vc.Sandbox) error {
return vc.KillContainer(sb.ID(), id, syscall.Signal(sig), true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should call sb.SignalProcess() instead. Whenever we have a sandbox pointer, we should be calling sb operations directly instead of the vc APIs.

@@ -532,7 +531,8 @@ func (p *XPod) waitVMStop() {
}
p.statusLock.RUnlock()

_, _ = <-p.sandbox.WaitVm(-1)
monitor, _ := p.sandbox.Monitor()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check for error?

lifupan and others added 11 commits June 19, 2018 09:46
using the sandbox api instead of vc api to
send signal to container; To check the returned
err for monitoring the vm.

Signed-off-by: fupan <[email protected]>
When do sandbox release action, it will stop the sandbox
monitor, once received this monitor stop notification,
it shouldn't do the pod clean action.

Signed-off-by: fupan <[email protected]>
If we send multiple grpcs at once before a client is created, we end up
creating multiple connections to the agent and that breaks when using builtin
proxy since only one connection is allowed.

Signed-off-by: Peng Tao <[email protected]>
Since there is a bug in kata-agent to support
sharepidns, thus set it to false temporarily.

Signed-off-by: fupan <[email protected]>
… in FetchSandbox api

When do sandbox release, the kataBuiltInProxy will be closed, and it will
stop the watch of vm's console; Thus it needs to restart the proxy to monitor
the vm console once to restore the sandbox.

Signed-off-by: fupan <[email protected]>
@gnawux
Copy link
Member

gnawux commented Jul 2, 2018

Travis report a build error

../../daemon/pod/persist.go:362: unknown field 'ContConfig' in struct literal of type "github.com/hyperhq/hyperd/types".PersistContainer

Since the ContainerConfig info is not used in restoring
a container, there is no need to save it into db.

Signed-off-by: fupan <[email protected]>
@lifupan lifupan force-pushed the kata-support branch 6 times, most recently from 16bec09 to 6748eae Compare July 3, 2018 08:59
@lifupan lifupan force-pushed the kata-support branch 2 times, most recently from 53bf002 to 994950e Compare July 11, 2018 05:59
Only keep the pidns and mntns for those containers
in sandbox/pod.

Signed-off-by: fupan <[email protected]>
Since the network hasn't been supported, thus comment
out those cases temporarily.

Signed-off-by: fupan <[email protected]>
@lifupan lifupan force-pushed the kata-support branch 2 times, most recently from e815653 to 7ae5ddd Compare July 20, 2018 02:17
The image irssi:1 didn't have 'ps' command, thus using
'whoami' to verify the user.

Signed-off-by: fupan <[email protected]>
Kata's wait process will do the process cleanup once the
process exit. If some io contents hasn't been read out
before the process's cleanup, it will be lost forever.

Thus it's better to do the wait process after the IO
terminated.

Signed-off-by: fupan <[email protected]>
Only when both of stdio and stderr reach to closed,
then call cleanup, otherwise, we'll lose some
contents in stdio or stderr.

Signed-off-by: fupan <[email protected]>
exec command didn't support spec user
overrides, thus makes it use root as
the default user.

Signed-off-by: fupan <[email protected]>
The latest irssi:1 image missed the ps command, thus
use irssi:1.0 image which contains ps command.

Signed-off-by: fupan <[email protected]>
Since the container json's mounts have been
merged to container spec's mounts, thus those
mounts needn't to be dealt.

Signed-off-by: fupan <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants