aboutsummaryrefslogtreecommitdiff
path: root/weed/server/master_server_handlers_admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/server/master_server_handlers_admin.go')
-rw-r--r--weed/server/master_server_handlers_admin.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/weed/server/master_server_handlers_admin.go b/weed/server/master_server_handlers_admin.go
index a762bf416..efe81bf89 100644
--- a/weed/server/master_server_handlers_admin.go
+++ b/weed/server/master_server_handlers_admin.go
@@ -181,10 +181,18 @@ func (ms *MasterServer) getVolumeGrowOption(r *http.Request) (*topology.VolumeGr
if err != nil {
return nil, err
}
+ preallocate := ms.preallocate
+ if r.FormValue("preallocate") != "" {
+ preallocate, err = strconv.ParseInt(r.FormValue("preallocate"), 10, 64)
+ if err != nil {
+ return nil, fmt.Errorf("Failed to parse int64 preallocate = %s: %v", r.FormValue("preallocate"), err)
+ }
+ }
volumeGrowOption := &topology.VolumeGrowOption{
Collection: r.FormValue("collection"),
ReplicaPlacement: replicaPlacement,
Ttl: ttl,
+ Prealloacte: preallocate,
DataCenter: r.FormValue("dataCenter"),
Rack: r.FormValue("rack"),
DataNode: r.FormValue("dataNode"),