From 61f24b081007b22084f9cec5c6a5afc62ebc0fe5 Mon Sep 17 00:00:00 2001 From: Tardis Xu Date: Mon, 20 Aug 2018 10:57:25 +0800 Subject: [PATCH] bugfix: fix that list volumes sets hostname as default label filter. --- daemon/mgr/volume.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/daemon/mgr/volume.go b/daemon/mgr/volume.go index 2835e1b08..c3dbea2d1 100644 --- a/daemon/mgr/volume.go +++ b/daemon/mgr/volume.go @@ -2,7 +2,6 @@ package mgr import ( "context" - "os" "strings" "github.com/alibaba/pouch/daemon/events" @@ -109,15 +108,6 @@ func (vm *VolumeManager) Get(ctx context.Context, name string) (*types.Volume, e // List returns all volumes on this host. func (vm *VolumeManager) List(ctx context.Context, labels map[string]string) ([]*types.Volume, error) { - if _, ok := labels["hostname"]; !ok { - hostname, err := os.Hostname() - if err != nil { - return nil, err - } - - labels["hostname"] = hostname - } - return vm.core.ListVolumes(labels) }