Merge pull request #607 from codido/fix_unsupported_ns

Fix handling of unsupported namespaces
This commit is contained in:
Mrunal Patel 2016-03-02 10:37:02 -08:00
commit 6403ea7481
1 changed files with 3 additions and 0 deletions

View File

@ -1064,6 +1064,9 @@ func (c *linuxContainer) currentState() (*State, error) {
state.NamespacePaths[ns.Type] = ns.GetPath(pid)
}
for _, nsType := range configs.NamespaceTypes() {
if !configs.IsNamespaceSupported(nsType) {
continue
}
if _, ok := state.NamespacePaths[nsType]; !ok {
ns := configs.Namespace{Type: nsType}
state.NamespacePaths[ns.Type] = ns.GetPath(pid)