Browse Source

Merge branch 'master' of github.com:chrislusf/weed-fs

pull/96/head
Chris Lu 10 years ago
parent
commit
89a06a8503
  1. 3
      go/topology/allocate_volume.go

3
go/topology/allocate_volume.go

@ -3,6 +3,7 @@ package topology
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"net/url" "net/url"
"github.com/chrislusf/weed-fs/go/storage" "github.com/chrislusf/weed-fs/go/storage"
@ -25,7 +26,7 @@ func AllocateVolume(dn *DataNode, vid storage.VolumeId, option *VolumeGrowOption
} }
var ret AllocateVolumeResult var ret AllocateVolumeResult
if err := json.Unmarshal(jsonBlob, &ret); err != nil { if err := json.Unmarshal(jsonBlob, &ret); err != nil {
return err
return fmt.Errorf("Invalid JSON result for %s: %s", "/admin/assign_volum", string(jsonBlob))
} }
if ret.Error != "" { if ret.Error != "" {
return errors.New(ret.Error) return errors.New(ret.Error)

Loading…
Cancel
Save