Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Commit

Permalink
hyperstart: move hyper and tty socket to per-pod runtime storage path
Browse files Browse the repository at this point in the history
Currently we have hyper/tty socket in /tmp/{hyper,tty}-pod-id.sock. We should
move them to /run/virtcontainers/pods/id/{hyper,tty}.sock to be unified.

Fixes #270

Signed-off-by: WANG Chao <[email protected]>
  • Loading branch information
wcwxyz committed Aug 10, 2017
1 parent 59004f2 commit 4dce315
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hyperstart.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/containers/virtcontainers/pkg/hyperstart"
)

var defaultSockPathTemplates = []string{"/tmp/hyper-pod-%s.sock", "/tmp/tty-pod%s.sock"}
var defaultSockPathTemplates = []string{"%s/%s/hyper.sock", "%s/%s/tty.sock"}
var defaultChannelTemplate = "sh.hyper.channel.%d"
var defaultDeviceIDTemplate = "channel%d"
var defaultIDTemplate = "charch%d"
Expand Down Expand Up @@ -58,8 +58,8 @@ func (c *HyperConfig) validate(pod Pod) bool {
virtLog.Infof("No sockets from configuration")

podSocketPaths := []string{
fmt.Sprintf(defaultSockPathTemplates[0], pod.id),
fmt.Sprintf(defaultSockPathTemplates[1], pod.id),
fmt.Sprintf(defaultSockPathTemplates[0], runStoragePath, pod.id),
fmt.Sprintf(defaultSockPathTemplates[1], runStoragePath, pod.id),
}

c.SockCtlName = podSocketPaths[0]
Expand Down

0 comments on commit 4dce315

Please sign in to comment.