<div dir="ltr"><div><div><div><div>Thanks for the reply, Sam.<br></div>Will explore this option. <br></div>BTW, I'm running the Havana release of swift. Did swift have the above features in this release?<br><br></div>Regards,<br></div>Shyam<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 20, 2014 at 10:12 PM, Samuel Merritt <span dir="ltr"><<a href="mailto:sam@swiftstack.com" target="_blank">sam@swiftstack.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 10/19/14, 11:24 PM, Shyam Prasad N wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I've written a few scripts to make adding of storage to swift cluster<br>
easier:<br>
remakerings: removes existing ring files and builds new empty rings.<br>
addtorings: adds new IP:DISK pair to existing rings.<br>
removefromrings: removes an IP:DISK pair from existing rings.<br>
<br>
I'm facing a problem in one scenario though...<br>
After adding a few IP:DISK pairs to the swift cluster, and the cluster<br>
is in use for sometime. Later, I decided to add more storage to the<br>
cluster. For some reason, if the addtorings for the new storage fails<br>
after partial completion (i.e. container and account rings updated; but<br>
object ring update failed).  So now I did a removefromrings to rollback<br>
my new changes. The remove request succeeds and gives a message "Will be<br>
removed from rings on next rebalance". But rebalance fails because the<br>
last rebalance was within 1 hr of the last rebalance. And re-adding the<br>
same IP:DISK pair to rings also fails; says "Already a part of rings".<br>
<br>
Is there anyway to workaround this problem? i.e. re-add the IP:DISK pair<br>
without having to wait for min_part_hours.<br>
</blockquote>
<br></div></div>
Two things:<br>
<br>
First, swift-ring-builder keeps backups of the builder files in an adjacent directory named "backups". Don't try to back out an un-pushed change by performing the inverse change; just grab the backup file and overwrite the modified builder files.<br>
<br>
(Note: an "un-pushed" change is one where the admin runs swift-ring-builder, but does not end up copying ring.gz files out to the cluster. Those changes can safely be thrown away since the cluster doesn't actually know about them. If a change makes it into ring.gz files and they are subsequently copied out to the cluster nodes, then it's better to undo a change by performing a new operation to cancel it out.)<br>
<br>
Second, that part about rebalance failing isn't quite right. That message is a warning, not an error, and its purpose is to tell the administrator that they're not done yet. swift-ring-builder exits with 0 on success, 1 on warning, and 2 on error. Your scripts should take that into account.<br>
<br>
______________________________<u></u>_________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>-Shyam
</div>