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

VMCache: check if vm_cache_endpoint file exists before VMCache server…#1410

Merged
bergwolf merged 1 commit into
kata-containers:masterfrom
teawater:vmcache_endpoint
Apr 3, 2019
Merged

VMCache: check if vm_cache_endpoint file exists before VMCache server…#1410
bergwolf merged 1 commit into
kata-containers:masterfrom
teawater:vmcache_endpoint

Conversation

@teawater
Copy link
Copy Markdown
Member

… runs

There is an issue that more than one VMCache server can run with same
vm_cache_endpoint file together.
The cause is factory try to remove vm_cache_endpoint file before VMCache
server runs.
Change it to check if vm_cache_endpoint file exists before VMCache server
runs to handle the issue.

Fixes: #1385

Signed-off-by: Hui Zhu teawater@hyper.sh

@teawater
Copy link
Copy Markdown
Member Author

/test

Comment thread cli/factory.go Outdated
@teawater
Copy link
Copy Markdown
Member Author

/test

@teawater
Copy link
Copy Markdown
Member Author

teawater commented Apr 2, 2019

jenkins-ci-ARM-ubuntu-18-04 failed:

00:07:41 /home/jenkins/workspace/kata-containers-runtime-ARM-18.04-PR/go/src/github.com/kata-containers/runtime/virtcontainers/utils
00:07:58 virtcontainers/qemu.go:1494:6: `genericMemoryTopology` is unused (deadcode)
00:07:58 func genericMemoryTopology(memoryMb, hostMemoryMb uint64, slots uint8, memoryOffset uint32) govmmQemu.Memory {
00:07:58      ^
00:07:58 cli/kata-check.go:55:2: `genericCPUFlagsTag` is unused (deadcode)
00:07:58 	genericCPUFlagsTag    = "flags"      // nolint: varcheck, unused
00:07:58 	^
00:07:58 cli/kata-check.go:56:2: `genericCPUVendorField` is unused (deadcode)
00:07:58 	genericCPUVendorField = "vendor_id"  // nolint: varcheck, unused
00:07:58 	^
00:07:58 cli/kata-check.go:57:2: `genericCPUModelField` is unused (deadcode)
00:07:58 	genericCPUModelField  = "model name" // nolint: varcheck, unused
00:07:58 	^
00:07:58 cli/kata-check_test.go:31:6: `testCPUData` is unused (deadcode)
00:07:58 type testCPUData struct {
00:07:58      ^
00:07:58 cli/kata-check_test.go:151:6: `genericTestGetCPUDetails` is unused (deadcode)
00:07:58 func genericTestGetCPUDetails(t *testing.T, validVendor string, validModel string, validContents string, data []testCPUDetail) {
00:07:58      ^
00:08:10 Build step 'Execute shell' marked build as failure
00:08:10 Performing Post build task...
00:08:10 Match found for :.* : True
00:08:10 Logical operation result is TRUE
00:08:10 Running script  : #!/bin/bash

This a64 format issue is handled by #1433
So I think current PR does not relate to this fail.

Comment thread cli/factory.go Outdated
}
if err = unix.Unlink(path); err != nil && !os.IsNotExist(err) {
return nil, err
if _, err = os.Stat(path); err == nil || os.IsExist(err) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is no os.IsExist error for os.Stat.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There is no os.IsExist error for os.Stat.

Submit a new version according to your comments.

… runs

There is an issue that more than one VMCache server can run with same
vm_cache_endpoint file together.
The cause is factory try to remove vm_cache_endpoint file before VMCache
server runs.
Change it to check if vm_cache_endpoint file exists before VMCache server
runs to handle the issue.

Fixes: kata-containers#1385

Signed-off-by: Hui Zhu <teawater@hyper.sh>
@teawater
Copy link
Copy Markdown
Member Author

teawater commented Apr 2, 2019

/test

@bergwolf bergwolf merged commit 755cbcd into kata-containers:master 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.

3 participants