This section describes some common OpenStack Object Storage maintenance tasks that you can perform with Chef.
For detailed OpenStack Object Storage troubleshooting and administrative procedures, refer to the OpenStack Swift developer documentation.
You can add a new OpenStack Object Storage node at any time with the following process.
swift-drive-audit periodically runs from cron and examines /var/log/kern.log for error messages pertaining to drives. When one is found the drive is automatically unmounted and swift replicates the data objects to the handoff nodes. If the issue is minor and does not require a drive replacement, refer to Short Failures. However, if the drive does require replacement refer to Long Failures. For more information refer to Detecting Failed Drives in the OpenStack documentation.
If the drive failure is serious, follow this procedure to remove it from the ring and re-balance the ring.
Note: Depending on the configuration of your swift cluster the failed drive may not be in all three rings. You will need to remove the failed drive from the ring where it is present.
sudo -i$swift-ring-builder /etc/swift/ring-workspace/rings/container.builder$swift-ring-builder /etc/swift/ring-workspace/rings/object.builder$swift-ring-builder /etc/swift/ring-workspace/rings/account.builder
$swift-ring-builder /etc/swift/ring-workspace/rings/container.builder \ remove$failed_node_IP/device_IDswift-ring-builder /etc/swift/ring-workspace/rings/object.builder \ removefailed_node_IP/$device_IDswift-ring-builder /etc/swift/ring-workspace/rings/account.builder \ removefailed_node_IP/device_ID
$swift-ring-builder /etc/swift/ring-workspace/rings/container.builder \ rebalance$swift-ring-builder /etc/swift/ring-workspace/rings/object.builder \ rebalance$swift-ring-builder /etc/swift/ring-workspace/rings/account.builder \ rebalance
$cd /etc/swift/ring-workspace/rings$git commit -a -m "ring update"$git push
chef-client.In most cases node failures are short events, such as reboots. OpenStack Object Storage replication handles object replication and storage through the handoff nodes and no action needs to be taken to maintain the consistency of the cluster.
OpenStack Object Storage uses a tombstone file to replicate file deletion alongside file creation, and by default the reclaim_age is set to 86400 seconds to expire tombstone files. If a storage node will be offline for more than a day, the node should be removed from the cluster until the node can be brought back online. This action preserves data consistency.
For example, a file could be deleted from one node just before the node fails, and the tombstone file would not be replicated to other members of the swift cluster. If the failed node is then brought back online after the reclaim_age period, the tombstone file could be replicated to other nodes and cause data consistency issues.
The best advice is to get the server back online. If the device is going to be down for more than 1 day refer to Long Node Failures. No modification of the swift ring is required if drives are not replaced.
If the storage node will be down for more than 1 day, you should remove the node from the ring.
$cd /etc/swift/ring-workspace/rings$swift-ring-builder /etc/swift/ring-workspace/rings/account.builder \ search$failed_node_IPswift-ring-builder /etc/swift/ring-workspace/rings/container.builder \ search$failed_node_IPswift-ring-builder /etc/swift/ring-workspace/rings/object.builder search \failed_node_IP
$swift-ring-builder /etc/swift/ring-workspace/rings/account.builder \ remove$failed_node_IPswift-ring-builder /etc/swift/ring-workspace/rings/container.builder \ remove$failed_node_IPswift-ring-builder /etc/swift/ring-workspace/rings/object.builder \ removefailed_node_IP
$swift-ring-builder /etc/swift/ring-workspace/rings/account.builder \ rebalance$swift-ring-builder /etc/swift/ring-workspace/rings/container.builder \ rebalance$swift-ring-builder /etc/swift/ring-workspace/rings/object.builder \ rebalance
$cd /etc/swift/ring-workspace/rings$git commit -a -m "ring update"$git push
Note: If you re-installed the Operating System on the node you should wipe the drives and start from scratch.
$ chef-client
$cd /etc/swift/ring-workspace$cat ./generate-rings.sh
$sed -i 's/exit 0/# exit 0/g' generate-rings.sh$./generate-rings.sh
$cd /etc/swift/ring-workspace/rings$git commit -a -m "ring update"$git push
chef-client.© 2011-2013 Rackspace US, Inc.
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

2 Comments
bad links
david.
re: bad links
Add new comment