aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_volume_server_evacuate.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2024-11-04 00:08:45 +0500
committerGitHub <noreply@github.com>2024-11-03 11:08:45 -0800
commit5bddf0c085c8d1eabb3d1bd4f206ce60d5589c0d (patch)
treee803efcfefdb4c59b3c3b5e951ff0648039f9c06 /weed/shell/command_volume_server_evacuate.go
parent65fb8fad996836767b5827582e25a8af23927efa (diff)
downloadseaweedfs-5bddf0c085c8d1eabb3d1bd4f206ce60d5589c0d.tar.xz
seaweedfs-5bddf0c085c8d1eabb3d1bd4f206ce60d5589c0d.zip
[shell] volume.balance collect volume servers by dc rack node (#6191)
* chore: balance by rack * fix: rm check lock * fix: selected racks * fix: selected nodes * fix: containts * fix: one collectVolumeServersByDcRackNode * fix: revert lock and add lock * fix: panic test * revert noLock
Diffstat (limited to 'weed/shell/command_volume_server_evacuate.go')
-rw-r--r--weed/shell/command_volume_server_evacuate.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/shell/command_volume_server_evacuate.go b/weed/shell/command_volume_server_evacuate.go
index 3b593d9be..5c7c903de 100644
--- a/weed/shell/command_volume_server_evacuate.go
+++ b/weed/shell/command_volume_server_evacuate.go
@@ -110,7 +110,7 @@ func (c *commandVolumeServerEvacuate) volumeServerEvacuate(commandEnv *CommandEn
func (c *commandVolumeServerEvacuate) evacuateNormalVolumes(commandEnv *CommandEnv, volumeServer string, skipNonMoveable, applyChange bool, writer io.Writer) error {
// find this volume server
- volumeServers := collectVolumeServersByDc(c.topologyInfo, "")
+ volumeServers := collectVolumeServersByDcRackNode(c.topologyInfo, "", "", "")
thisNodes, otherNodes := c.nodesOtherThan(volumeServers, volumeServer)
if len(thisNodes) == 0 {
return fmt.Errorf("%s is not found in this cluster", volumeServer)
@@ -124,7 +124,7 @@ func (c *commandVolumeServerEvacuate) evacuateNormalVolumes(commandEnv *CommandE
fmt.Fprintf(writer, "update topologyInfo %v", err)
} else {
_, otherNodesNew := c.nodesOtherThan(
- collectVolumeServersByDc(topologyInfo, ""), volumeServer)
+ collectVolumeServersByDcRackNode(topologyInfo, "", "", ""), volumeServer)
if len(otherNodesNew) > 0 {
otherNodes = otherNodesNew
c.topologyInfo = topologyInfo