diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go index a313ef5ccf..c8a0b9378d 100644 --- a/daemon/container_operations_unix.go +++ b/daemon/container_operations_unix.go @@ -153,20 +153,6 @@ func (daemon *Daemon) DisconnectFromNetwork(container *container.Container, n li return nil } -// called from the libcontainer pre-start hook to set the network -// namespace configuration linkage to the libnetwork "sandbox" entity -func (daemon *Daemon) setNetworkNamespaceKey(containerID string, pid int) error { - path := fmt.Sprintf("/proc/%d/ns/net", pid) - var sandbox libnetwork.Sandbox - search := libnetwork.SandboxContainerWalker(&sandbox, containerID) - daemon.netController.WalkSandboxes(search) - if sandbox == nil { - return fmt.Errorf("error locating sandbox id %s: no sandbox found", containerID) - } - - return sandbox.SetKey(path) -} - func (daemon *Daemon) getIpcContainer(container *container.Container) (*container.Container, error) { containerID := container.HostConfig.IpcMode.Container() c, err := daemon.GetContainer(containerID) @@ -355,25 +341,6 @@ func getDevicesFromPath(deviceMapping containertypes.DeviceMapping) (devs []spec return devs, devPermissions, fmt.Errorf("error gathering device information while adding custom device %q: %s", deviceMapping.PathOnHost, err) } -func mergeDevices(defaultDevices, userDevices []*configs.Device) []*configs.Device { - if len(userDevices) == 0 { - return defaultDevices - } - - paths := map[string]*configs.Device{} - for _, d := range userDevices { - paths[d.Path] = d - } - - var devs []*configs.Device - for _, d := range defaultDevices { - if _, defined := paths[d.Path]; !defined { - devs = append(devs, d) - } - } - return append(devs, userDevices...) -} - func detachMounted(path string) error { return syscall.Unmount(path, syscall.MNT_DETACH) } diff --git a/daemon/container_operations_windows.go b/daemon/container_operations_windows.go index 701bfd8c90..6ef3be440d 100644 --- a/daemon/container_operations_windows.go +++ b/daemon/container_operations_windows.go @@ -30,11 +30,6 @@ func (daemon *Daemon) getSize(container *container.Container) (int64, int64) { return 0, 0 } -// setNetworkNamespaceKey is a no-op on Windows. -func (daemon *Daemon) setNetworkNamespaceKey(containerID string, pid int) error { - return nil -} - func (daemon *Daemon) setupIpcDirs(container *container.Container) error { return nil } diff --git a/distribution/xfer/upload_test.go b/distribution/xfer/upload_test.go index 275d24268d..16bd187336 100644 --- a/distribution/xfer/upload_test.go +++ b/distribution/xfer/upload_test.go @@ -7,7 +7,6 @@ import ( "time" "github.com/docker/distribution" - "github.com/docker/distribution/digest" "github.com/docker/docker/layer" "github.com/docker/docker/pkg/progress" "golang.org/x/net/context" @@ -79,14 +78,6 @@ func uploadDescriptors(currentUploads *int32) []UploadDescriptor { } } -var expectedDigests = map[layer.DiffID]digest.Digest{ - layer.DiffID("sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0382cfbdbf"): digest.Digest("sha256:c5095d6cf7ee42b7b064371dcc1dc3fb4af197f04d01a60009d484bd432724fc"), - layer.DiffID("sha256:1515325234325236634634608943609283523908626098235490238423902343"): digest.Digest("sha256:968cbfe2ff5269ea1729b3804767a1f57ffbc442d3bc86f47edbf7e688a4f36e"), - layer.DiffID("sha256:6929356290463485374960346430698374523437683470934634534953453453"): digest.Digest("sha256:8a5e56ab4b477a400470a7d5d4c1ca0c91235fd723ab19cc862636a06f3a735d"), - layer.DiffID("sha256:8159352387436803946235346346368745389534789534897538734598734987"): digest.Digest("sha256:5e733e5cd3688512fc240bd5c178e72671c9915947d17bb8451750d827944cb2"), - layer.DiffID("sha256:4637863963478346897346987346987346789346789364879364897364987346"): digest.Digest("sha256:ec4bb98d15e554a9f66c3ef9296cf46772c0ded3b1592bd8324d96e2f60f460c"), -} - func TestSuccessfulUpload(t *testing.T) { lum := NewLayerUploadManager(maxUploadConcurrency) diff --git a/oci/defaults_linux.go b/oci/defaults_linux.go index 9ee7546193..04d56f9cf3 100644 --- a/oci/defaults_linux.go +++ b/oci/defaults_linux.go @@ -8,7 +8,6 @@ import ( ) func sPtr(s string) *string { return &s } -func rPtr(r rune) *rune { return &r } func iPtr(i int64) *int64 { return &i } func u32Ptr(i int64) *uint32 { u := uint32(i); return &u } func fmPtr(i int64) *os.FileMode { fm := os.FileMode(i); return &fm }