Skip to content

Commit

Permalink
Merge pull request #2119 from xiaoxubeii/fix-list-vols
Browse files Browse the repository at this point in the history
bugfix: fix that list volumes sets hostname as default label filter
  • Loading branch information
rudyfly authored Aug 22, 2018
2 parents f773ce8 + 61f24b0 commit 0eed9c4
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions daemon/mgr/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package mgr

import (
"context"
"os"
"strings"

"github.com/alibaba/pouch/daemon/events"
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit 0eed9c4

Please sign in to comment.