此内容没有您所选择的语言版本。
6.3.6. Removing Nodes from Districts
If many gears on a node host become idle over time, you can compact the district by decommissioning or re-purposing the node host. Use the
oo-admin-ctl-district and oo-admin-move commands in combination to remove the gears from the node host, and then remove the host from its district.
Procedure 6.4. To Remove Nodes from Districts:
The following steps demonstrate an example situation where district
small_district has two node hosts, node1.example.com and node2.example.com. The second node host, node2.example.com, has a high number of idle gears.
- Run the following commands and fix any problems that are found. This prevents future problems caused by moving a broken gear. On the broker host, run:
oo-admin-chk
# oo-admin-chkCopy to Clipboard Copied! Toggle word wrap Toggle overflow On the node hosts, run:oo-accept-node
# oo-accept-nodeCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Deactivate the node you want to remove to prevent applications from being created on or moved to the node. Existing gears continue running. On the broker host, run:
oo-admin-ctl-district -c deactivate-node -n small_district -i node2.example.com
# oo-admin-ctl-district -c deactivate-node -n small_district -i node2.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Move all the gears from
node2.example.comtonode1.example.comby repeating the following command on the broker host for each gear onnode2.example.com:oo-admin-move --gear_uuid UUID -i node1.example.com
# oo-admin-move --gear_uuid UUID -i node1.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove
node2.example.comfrom the district:oo-admin-ctl-district -c remove-node -n small_district -i node2.example.com
# oo-admin-ctl-district -c remove-node -n small_district -i node2.example.comCopy to Clipboard Copied! Toggle word wrap Toggle overflow