Merge pull request #213 from runcom/bump-runtime-tools

*: bump opencontainers/runtime-tools
This commit is contained in:
Mrunal Patel 2016-11-24 08:29:43 -08:00 committed by GitHub
commit b6f1b027eb
11 changed files with 2529 additions and 328 deletions

View file

@ -149,9 +149,9 @@ func (s *Server) createSandboxContainer(containerID string, containerName string
return nil, fmt.Errorf("Mount.HostPath is empty")
}
options := "rw"
options := []string{"rw"}
if mount.GetReadonly() {
options = "ro"
options = []string{"ro"}
}
if mount.GetSelinuxRelabel() {
@ -162,7 +162,6 @@ func (s *Server) createSandboxContainer(containerID string, containerName string
}
specgen.AddBindMount(src, dest, options)
}
labels := containerConfig.GetLabels()
@ -283,7 +282,7 @@ func (s *Server) createSandboxContainer(containerID string, containerName string
}
specgen.AddAnnotation("ocid/labels", string(labelsJSON))
if err = specgen.SaveToFile(filepath.Join(containerDir, "config.json")); err != nil {
if err = specgen.SaveToFile(filepath.Join(containerDir, "config.json"), generate.ExportOptions{}); err != nil {
return nil, err
}

View file

@ -107,7 +107,7 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
return nil, err
}
g.AddBindMount(resolvPath, "/etc/resolv.conf", "ro")
g.AddBindMount(resolvPath, "/etc/resolv.conf", []string{"ro"})
// add metadata
metadata := req.GetConfig().GetMetadata()
@ -228,7 +228,7 @@ func (s *Server) RunPodSandbox(ctx context.Context, req *pb.RunPodSandboxRequest
}
}
err = g.SaveToFile(filepath.Join(podSandboxDir, "config.json"))
err = g.SaveToFile(filepath.Join(podSandboxDir, "config.json"), generate.ExportOptions{})
if err != nil {
return nil, err
}