Merge pull request #35526 from brauner/2017-11-16/docker_xfs_quota_userns

skip xfs quota tests when running in user namespace
This commit is contained in:
Phil Estes 2017-11-17 13:41:58 -05:00 committed by GitHub
commit 8124d21d2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,7 @@ import (
"path/filepath"
"unsafe"
rsystem "github.com/opencontainers/runc/libcontainer/system"
"github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
)
@ -98,6 +99,14 @@ type Control struct {
// project ids.
//
func NewControl(basePath string) (*Control, error) {
//
// If we are running in a user namespace quota won't be supported for
// now since makeBackingFsDev() will try to mknod().
//
if rsystem.RunningInUserNS() {
return nil, ErrQuotaNotSupported
}
//
// create backing filesystem device node
//