Skip to content

Commit

Permalink
bugfix: fix that list volumes sets hostname as default label filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxubeii committed Aug 21, 2018
1 parent 5847b76 commit 61f24b0
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 61f24b0

Please sign in to comment.