Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time namespace missing #783

Open
champtar opened this issue Jan 22, 2025 · 0 comments · May be fixed by #784
Open

time namespace missing #783

champtar opened this issue Jan 22, 2025 · 0 comments · May be fixed by #784

Comments

@champtar
Copy link

runc supports time namespace since 1.2.0 (opencontainers/runc#3876)

It was added to runtime-spec in opencontainers/runtime-spec#1151

But is missing in this repo:

Namespaces = []string{"network", "pid", "mount", "ipc", "uts", "user", "cgroup"}

func mapStrToNamespace(ns string, path string) (rspec.LinuxNamespace, error) {
switch ns {
case "network":
return rspec.LinuxNamespace{Type: rspec.NetworkNamespace, Path: path}, nil
case "pid":
return rspec.LinuxNamespace{Type: rspec.PIDNamespace, Path: path}, nil
case "mount":
return rspec.LinuxNamespace{Type: rspec.MountNamespace, Path: path}, nil
case "ipc":
return rspec.LinuxNamespace{Type: rspec.IPCNamespace, Path: path}, nil
case "uts":
return rspec.LinuxNamespace{Type: rspec.UTSNamespace, Path: path}, nil
case "user":
return rspec.LinuxNamespace{Type: rspec.UserNamespace, Path: path}, nil
case "cgroup":
return rspec.LinuxNamespace{Type: rspec.CgroupNamespace, Path: path}, nil
default:
return rspec.LinuxNamespace{}, fmt.Errorf("unrecognized namespace %q", ns)
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant