Skip to content

Commit 0eed9c4

Browse files
authored
Merge pull request #2119 from xiaoxubeii/fix-list-vols
bugfix: fix that list volumes sets hostname as default label filter
2 parents f773ce8 + 61f24b0 commit 0eed9c4

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

daemon/mgr/volume.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package mgr
22

33
import (
44
"context"
5-
"os"
65
"strings"
76

87
"github.com/alibaba/pouch/daemon/events"
@@ -109,15 +108,6 @@ func (vm *VolumeManager) Get(ctx context.Context, name string) (*types.Volume, e
109108

110109
// List returns all volumes on this host.
111110
func (vm *VolumeManager) List(ctx context.Context, labels map[string]string) ([]*types.Volume, error) {
112-
if _, ok := labels["hostname"]; !ok {
113-
hostname, err := os.Hostname()
114-
if err != nil {
115-
return nil, err
116-
}
117-
118-
labels["hostname"] = hostname
119-
}
120-
121111
return vm.core.ListVolumes(labels)
122112
}
123113

0 commit comments

Comments
 (0)