Skip to content

Commit dcf79f8

Browse files
Madhan Raj Mookkandymadhanrm
authored andcommitted
Use containerId instead of sandboxid for windows
Signed-off-by: Madhan Raj Mookkandy <madhanm@microsoft.com>
1 parent 6bbcd1b commit dcf79f8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

controller.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ import (
4848
"fmt"
4949
"net"
5050
"path/filepath"
51+
"runtime"
5152
"strings"
5253
"sync"
5354
"time"
@@ -1042,10 +1043,15 @@ func (c *controller) NewSandbox(containerID string, options ...SandboxOption) (S
10421043
}
10431044
c.Unlock()
10441045

1046+
sandboxID := stringid.GenerateRandomID()
1047+
if runtime.GOOS == "windows" {
1048+
sandboxID = containerID
1049+
}
1050+
10451051
// Create sandbox and process options first. Key generation depends on an option
10461052
if sb == nil {
10471053
sb = &sandbox{
1048-
id: stringid.GenerateRandomID(),
1054+
id: sandboxID,
10491055
containerID: containerID,
10501056
endpoints: epHeap{},
10511057
epPriority: map[string]int{},

0 commit comments

Comments
 (0)