diff --git a/weed/server/master_server.go b/weed/server/master_server.go index 1634f4b8f6..0fe35ccf2e 100644 --- a/weed/server/master_server.go +++ b/weed/server/master_server.go @@ -176,7 +176,11 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se v.GetBool("master.volume_growth.freeze_on_topology_mismatch"), v.GetDuration("master.volume_growth.state_loss_recovery_wait")) if str := strings.TrimSpace(v.GetString("master.volume_growth.allocation_deferral")); str != "" { - ms.Topo.SetAllocationDeferral(v.GetDuration("master.volume_growth.allocation_deferral")) + if d, err := time.ParseDuration(str); err != nil { + glog.Warningf("invalid master.volume_growth.allocation_deferral %q: %v", str, err) + } else { + ms.Topo.SetAllocationDeferral(d) + } } ms.Topo.QuarantineVolumeFn = func(dn *topology.DataNode, vid needle.VolumeId, readOnly bool) error { err := operation.WithVolumeServerClient(false, dn.ServerAddress(), ms.grpcDialOption, func(client volume_server_pb.VolumeServerClient) error {