Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Stable 1.6 backports#1468

Merged
egernst merged 5 commits into
kata-containers:stable-1.6from
egernst:stable-1.6-backports
Apr 3, 2019
Merged

Stable 1.6 backports#1468
egernst merged 5 commits into
kata-containers:stable-1.6from
egernst:stable-1.6-backports

Conversation

@egernst
Copy link
Copy Markdown
Member

@egernst egernst commented Apr 3, 2019

relevant backports since 1.6 release:
eadf977 Factory: Fix fake return value issue on creating template
dd6e8eb tests: do cleanUp() always in the end
096fa04 qemu: fix qemu leak when failed to start container
fb64a3e doc: update architecture.md link
dca7a6f config: validate proxy path

@egernst egernst requested a review from a team as a code owner April 3, 2019 04:36
jongwu and others added 2 commits April 2, 2019 21:37
Now, function NewFactory will return nil even create template
does't complete. As for this, it will tell user that factory
has been initialized no matter whether the template is created
or not. This patch correct it by adding another return value
of error in NewFactory.

Testing initFactoryCommand when enable template will need root
privilege to mount tmpfs. So skip it for no-root user.

Testing initFactoryCommand func will create template, but no
proxy type assigned to VMconfig which will using katabuiltinProxy
instead. this will lead to failure for this type of proxy will
check proxyparams which contains many null value. This commit
fix it by substitute katabuiltinProxy as noopProxy when for test
purpose.

Fixes: kata-containers#1333
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
Fixes: kata-containers#1422

Detect failing test case:

```
....
=== RUN   TestEnterContainerFailingContNotStarted
--- PASS: TestEnterContainerFailingContNotStarted (0.01s)
=== RUN   TestEnterContainer
--- FAIL: TestEnterContainer (0.00s)
 Error Trace: sandbox_test.go:1154
 Error:      	Expected value not to be nil.
 Messages:   	Entering non-running container should fail
 Error Trace: sandbox_test.go:1157
 Error:      	Expected nil, but got: &errors.errorString{s:"Can not
move from running to running"}
 Messages:   	Failed to start sandbox: Can not move from running to
running
FAIL
```

`TestEnterContainerFailingContNotStarted` calls `cleanUp` at function
begging but it doesn't clean its garbage after it ends.
`TestEnterContainer` only call `cleanUp` in the end but it doesn't do
cleanUp in the begging, that gives first test case a chance to impact
latter one.

This commit modifies all the test cases, let them all do the cleanUp()
in the end.

The policy here is: "everyone needs to take their garbage away when they
leave" :)

Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
@egernst
Copy link
Copy Markdown
Member Author

egernst commented Apr 3, 2019

Ace-Tang and others added 2 commits April 2, 2019 21:37
do cleanup inside startVM() if start vm get error

Fixes: kata-containers#1426

Signed-off-by: Ace-Tang <aceapril@126.com>
update architecture.md link, since it has moved to within the
design/ directory.

Fixes: kata-containers#1462

Signed-off-by: Gabi Beyer <Gabrielle.n.beyer@intel.com>
@egernst egernst mentioned this pull request Apr 3, 2019
@egernst
Copy link
Copy Markdown
Member Author

egernst commented Apr 3, 2019

/test

@WeiZhang555
Copy link
Copy Markdown
Member

| | c89eb81 Merge pull request #1425 from bergwolf/proxy-path
no backport -> | * | | dca7a6f config: validate proxy path

I think this is also a bugfix, wdyt?

@bergwolf
Copy link
Copy Markdown
Member

bergwolf commented Apr 3, 2019

@WeiZhang555 Yes, good catch! It fixes kata-runtime kata-env command. So it makes sense to have it in stable as well.

@egernst egernst force-pushed the stable-1.6-backports branch from 70b312a to 94e9202 Compare April 3, 2019 14:40
@egernst
Copy link
Copy Markdown
Member Author

egernst commented Apr 3, 2019

@bergwolf @WeiZhang555 updated to remove the VMcache change and include the proxy path validation change.

@egernst
Copy link
Copy Markdown
Member Author

egernst commented Apr 3, 2019

/test

Like shim, we should validate the proxy path if it is provided.

Fixes: kata-containers#1424

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
@jcvenegas
Copy link
Copy Markdown
Member

Metrics:

09:06:43 | *F* | memory-footprint     | 95.0% | 85.0% | 105.0% | 10.0% | 85.0% | 85.0%  | 0.0%  | 0.0% |   1 |

cri-containerd job:

sudo: kubeadm: command not found

Travis shimv2 linter issues

/home/travis/gopath/src/github.com/kata-containers/runtime/virtcontainers/utils
containerd-shim-v2/service.go:594:10: `events.TaskPaused` composite literal uses unkeyed fields (govet)
	s.send(&eventstypes.TaskPaused{

@chavafg
Copy link
Copy Markdown
Contributor

chavafg commented Apr 3, 2019

the kubeadm error will dissapear when kata-containers/tests#1404 lands.

@jcvenegas
Copy link
Copy Markdown
Member

/test

@egernst egernst merged commit 94e9202 into kata-containers:stable-1.6 Apr 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants