diff options
| author | Chris Lu <chris.lu@gmail.com> | 2015-02-25 23:59:18 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2015-02-25 23:59:18 -0800 |
| commit | 89a06a8503f084b5972ce050352f4546aa39782e (patch) | |
| tree | c9553daf434d9874fc5de0d9239464b175cdd501 | |
| parent | a506e7953f73c5781c570300202e61468ce418c6 (diff) | |
| parent | 382c521df725e351a283010dfbe30846ec400b39 (diff) | |
| download | seaweedfs-89a06a8503f084b5972ce050352f4546aa39782e.tar.xz seaweedfs-89a06a8503f084b5972ce050352f4546aa39782e.zip | |
Merge branch 'master' of github.com:chrislusf/weed-fs
| -rw-r--r-- | go/topology/allocate_volume.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/go/topology/allocate_volume.go b/go/topology/allocate_volume.go index 669177c09..22730211d 100644 --- a/go/topology/allocate_volume.go +++ b/go/topology/allocate_volume.go @@ -3,6 +3,7 @@ package topology import ( "encoding/json" "errors" + "fmt" "net/url" "github.com/chrislusf/weed-fs/go/storage" @@ -25,7 +26,7 @@ func AllocateVolume(dn *DataNode, vid storage.VolumeId, option *VolumeGrowOption } var ret AllocateVolumeResult 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 != "" { return errors.New(ret.Error) |
