reset replica state not forbidden for active replica

Bug #2015328 reported by Maurice Escher
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)

Bug Description


what happened:

I had a share in a replication setup, A was my active replica (replica_state 'active'), B was my non-active replica (replica_state 'error', but the exact state doesn't matter).

I triggered 'manila share-replica-reset-state <ID_of_A>' (probably my good intention was to do something to get out of the error on B). By default this set the replica_state of A to 'out_of_sync'.

I ended up in a situation with no active replica left.
I expected some server side validation preventing me to do such a stupid thing ;)

Can a respective safeguard be implemented?


The out_of_sync replica A went into replica_state error later during periodic replica update.
Another user deleted (with force option?) the replica A in error as part of a cleanup.
Ooops -> my share was gone, data lost.

Vida Haririan (vhariria)
Changed in manila:
importance: Undecided → Low
Vida Haririan (vhariria)
Changed in manila:
status: New → Incomplete
tags: added: low-hanging-fruit
Changed in manila:
status: Incomplete → New
importance: Low → Medium
Revision history for this message
Vida Haririan (vhariria) wrote :
Vida Haririan (vhariria)
Changed in manila:
status: New → Triaged
Revision history for this message
Goutham Pacha Ravi (gouthamr) wrote :


Commenting back here to retain the "low-hanging-fruit" tag on this bug. In the fix, the code must check if the reset_replica_state action is being run against an "active" replica.

In ; we're introducing a "get" operation in the mix, so we'd have the data to verify the existing replica_state; so we'd need to add the following validation:

  if (status_attr == 'replica_state'
          and resource['replica_state'] == constants.REPLICA_STATE_ACTIVE):
     msg = _("Cannot reset replica_state of active replica")
     raise webob.exc.HTTPBadRequest(explanation=msg)

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.