1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-09-15 13:30:36 +02:00

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

This commit is contained in:
Chris Lu 2015-02-25 23:59:18 -08:00
commit 89a06a8503

View file

@ -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)