Can the number of replicas be changeable?

Bug #958144 reported by justinsb on 2012-03-17
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Samuel Merritt

Bug Description

For deployment, it would be nice to be able to start with a single swift node, and then add additional nodes at a later date.

i.e. Initially start with one node, replication count = 1
After a few weeks, and a second node and bump replication count = 2

(And maybe also later bump replication count from 2 to 3)

However, I believe the replication count cannot be changed for a ring.

Thus, I think we're stuck doing the same trick as devstack, where we install multiple independent swift installs on the same node.

It would be nice to be able to increase the replication count later on.

Or, if this is tricky, maybe we could have a temporary replica count, so that I set my max replica count (e.g. 3), but then I set a 'temporary' replica count of 1 initially. The replicator won't create replicas 2 and 3, the ring is degraded and maybe performance won't be great because of retries, but I think everything would still work from the user perspective. Then, I add my second server, and bump my 'temporary' replica count to 2, and it creates two replicas, so still degraded but functioning (better). Finally, I add a third server, remove the temporary flag, and I have grown up into a working swift install?

Changed in swift:
assignee: nobody → justinsb (justin-fathomdb)
status: New → In Progress
justinsb (justin-fathomdb) wrote :

Uploaded (an attempt at) code that can do this. The code is surprisingly simple if it is as simple as I think it is!

Certainly this would make packaging much nicer, because then packagers can in good faith set replication=1 initially, without painting the user into a corner.

Mike Barton (redbo) wrote :

I haven't looked at the code yet, but if you're doing something analogous to resizing the array then assigning devices to the new partition slots, I can't think of any reason it wouldn't work.

Samuel Merritt (torgomatic) wrote :

Fixed in 7548cb9

Changed in swift:
assignee: justinsb (justin-fathomdb) → Samuel Merritt (torgomatic)
importance: Undecided → Medium
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-03-19
Changed in swift:
milestone: none → 1.8.0-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-04-04
Changed in swift:
milestone: 1.8.0-rc1 → 1.8.0
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers