openvstorage/alba

Linking local backend to global backend results in Albamgr_protocol.Protocol.Error.Osd_already_exists

Closed this issue · 4 comments

We performed the following steps to reproduce the error: Albamgr_protocol.Protocol.Error.Osd_already_exists

  • Add a global backend
  • Add a local backend (with a NoSatisfiablePolicy)
  • Link the local backend to the global backend
  • It will fail with the following error: Client_exception: Alba_client_errors.Error.NoSatisfiablePolicy
  • Make the policy satisfiable on the local backend
  • Retry to link the local backend to the global backend, this will result in the following error: Albamgr exception: Albamgr_protocol.Protocol.Error.Osd_already_exists
domsj commented

I think this is a framework-alba-plugin bug. Can the issue be moved?
The framework code should handle the returned Osd_already_exists error and just continue with trying the claim-osd call.
@khenderick let me know if you disagree or not

I'm not sure at this point @domsj; as the add-osd fails with the NoSatisfiablePolicy error, I'm not sure whether it was added or not since an error is thrown, I'd expect it to be not added at all. Otherwise, a warning might be more appropriate. So on the next try, I would expect I have to try it again.

I do agree that catching the failed add-osd call and execute a claim-osd call instead could be a solution (albeit not one that I'd like to implement - if a customer would for example add an Asd with a given ID and after that the framework somehow tries to create one with the same ID, it fails and then just assuming it's the good one and claim it might not be a good idea), but I don't agree that there is no issue Alba.

After some more discussions with @domsj, it turns out that I was kinda completely wrong 😰. So the add-osd succeeds, but the claim-osd fails. And we always execute the add-osd, even if it was already added. Do'h.

Let's fire up the ticket mover, 'cause this one doesn't belong here.