diff options
-rw-r--r-- | runsc/boot/loader.go | 2 | ||||
-rw-r--r-- | runsc/test/testutil/testutil.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index d953bb783..7cac346c9 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -258,7 +258,7 @@ func New(args Args) (*Loader, error) { NetworkStack: networkStack, ApplicationCores: uint(args.NumCPU), Vdso: vdso, - RootUTSNamespace: kernel.NewUTSNamespace(args.Spec.Hostname, "", creds.UserNamespace), + RootUTSNamespace: kernel.NewUTSNamespace(args.Spec.Hostname, args.Spec.Hostname, creds.UserNamespace), RootIPCNamespace: kernel.NewIPCNamespace(creds.UserNamespace), RootAbstractSocketNamespace: kernel.NewAbstractSocketNamespace(), }); err != nil { diff --git a/runsc/test/testutil/testutil.go b/runsc/test/testutil/testutil.go index 3490bd11e..d323d7899 100644 --- a/runsc/test/testutil/testutil.go +++ b/runsc/test/testutil/testutil.go @@ -151,6 +151,7 @@ func NewSpecWithArgs(args ...string) *specs.Spec { Source: TmpDir(), }, }, + Hostname: "runsc-test-" + strings.Join(args, "_"), } } |