Add read only public port on volume server

Add read only public port on volume server
This commit is contained in:
chrislusf
2015-03-09 01:10:01 -07:00
parent d48d76cb4f
commit f511b507a5
12 changed files with 71 additions and 74 deletions

View File

@@ -3,6 +3,7 @@ package operation
import (
"encoding/json"
"errors"
"fmt"
"net/url"
"strconv"
@@ -38,7 +39,7 @@ func Assign(server string, count int, replication string, collection string, ttl
var ret AssignResult
err = json.Unmarshal(jsonBlob, &ret)
if err != nil {
return nil, err
return nil, fmt.Errorf("JSON unmarshal error:%v, json:%s", err, string(jsonBlob))
}
if ret.Count <= 0 {
return nil, errors.New(ret.Error)