"swift-ring-builder set_info" command doesn't recognize 0 as a search value when "--id" is used as a key

Bug #1513955 reported by Marc Heckmann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Low
Unassigned

Bug Description

Given the following ring builder:

==========================
$ swift-ring-builder account.builder
account.builder, build version 16
131072 partitions, 3.000000 replicas, 1 regions, 1 zones, 3 devices, 0.00 balance, 0.00 dispersion
The minimum number of hours before a partition can be reassigned is 1
The overload factor is 0.00% (0.000000)
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
             0 1 1 172.16.0.11 6002 172.16.0.11 6002 SSD1 100.00 131072 0.00
             1 1 1 10.131.0.12 6002 10.131.0.12 6002 SSD2 100.00 131072 0.00
             3 1 1 10.131.0.13 6002 10.131.0.13 6002 SSD3 100.00 131072 0.00
============================

I should be able to change IPs by using the ID as a key. This works when the ID is > 0. But fails for ID = 0:

====================================================
$ swift-ring-builder account.builder set_info --change-ip 10.131.0.11 --change-replication-ip 10.131.0.11 --id 0
Invalid <search-value>: '--id'
==================================================

Expected output should be similar to what I see when ID is > 0:

===================================================
$ swift-ring-builder account.builder set_info --change-ip 10.131.0.12 --change-replication-ip 10.131.0.12 --id 1
Device d1r1z1-172.16.0.12:6002R172.16.0.12:6002/SSD2_"" is now d1r1z1-10.131.0.12:6002R10.131.0.12:6002/SSD2_""
===================================================

This is with 2.5.0.

As an aside, the "--id" option/key seems undocumented in the help output of swift-ring-builder.

clayg (clay-gerrard)
Changed in swift:
importance: Undecided → Low
status: New → Confirmed
tags: added: low-hanging-fruit
Changed in swift:
assignee: nobody → Steve Wilkerson (sw5822)
Changed in swift:
status: Confirmed → In Progress
Changed in swift:
assignee: Steve Wilkerson (sw5822) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/267308

dangming (743759846-7)
Changed in swift:
status: In Progress → Confirmed
status: Confirmed → In Progress
assignee: nobody → dangming (743759846-7)
Revision history for this message
Ondřej Nový (onovy) wrote :

i think this has been fixed here:
https://review.openstack.org/#/c/232518/
can you recheck pls?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on swift (master)

Change abandoned by dangming (<email address hidden>) on branch: master
Review: https://review.openstack.org/267308
Reason: this bug is already fixed

dangming (743759846-7)
Changed in swift:
assignee: dangming (743759846-7) → nobody
Revision history for this message
clayg (clay-gerrard) wrote :

this is definitely fixed on master - maybe it was Change-Id: I4ee379c242f090d116cd2504e21d0e1904cdc2fc

Changed in swift:
status: In Progress → Fix Released
status: Fix Released → Fix Committed
Changed in swift:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.