diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-06-01 00:39:39 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-06-01 00:39:39 -0700 |
| commit | 43e3f5724ca31918cd5a3d282639bd4f34e6bc58 (patch) | |
| tree | 8aa653c78756a9adc2f98e7e281e0892bad95735 /weed/command/volume.go | |
| parent | a6f7f9b0b8baedad7b1555c7e01a4ab3cec3784c (diff) | |
| download | seaweedfs-43e3f5724ca31918cd5a3d282639bd4f34e6bc58.tar.xz seaweedfs-43e3f5724ca31918cd5a3d282639bd4f34e6bc58.zip | |
use fixed list of masters in both filer and volume servers
Diffstat (limited to 'weed/command/volume.go')
| -rw-r--r-- | weed/command/volume.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go index a54ffd1fd..407c39eb1 100644 --- a/weed/command/volume.go +++ b/weed/command/volume.go @@ -26,7 +26,7 @@ type VolumeServerOptions struct { ip *string publicUrl *string bindIp *string - master *string + masters *string pulseSeconds *int idleConnectionTimeout *int maxCpu *int @@ -47,7 +47,7 @@ func init() { v.ip = cmdVolume.Flag.String("ip", "", "ip or server name") v.publicUrl = cmdVolume.Flag.String("publicUrl", "", "Publicly accessible address") v.bindIp = cmdVolume.Flag.String("ip.bind", "0.0.0.0", "ip address to bind to") - v.master = cmdVolume.Flag.String("mserver", "localhost:9333", "master server location") + v.masters = cmdVolume.Flag.String("mserver", "localhost:9333", "comma-separated master servers") v.pulseSeconds = cmdVolume.Flag.Int("pulseSeconds", 5, "number of seconds between heartbeats, must be smaller than or equal to the master's setting") v.idleConnectionTimeout = cmdVolume.Flag.Int("idleTimeout", 30, "connection idle seconds") v.maxCpu = cmdVolume.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs") @@ -132,11 +132,14 @@ func runVolume(cmd *Command, args []string) bool { case "btree": volumeNeedleMapKind = storage.NeedleMapBtree } + + masters := *v.masters + volumeServer := weed_server.NewVolumeServer(volumeMux, publicVolumeMux, *v.ip, *v.port, *v.publicUrl, v.folders, v.folderMaxLimits, volumeNeedleMapKind, - *v.master, *v.pulseSeconds, *v.dataCenter, *v.rack, + strings.Split(masters, ","), *v.pulseSeconds, *v.dataCenter, *v.rack, v.whiteList, *v.fixJpgOrientation, *v.readRedirect, ) |
