Bug #3860
closedrbd: problems if watch setup returns ERANGE
0%
Description
When rbd sets up the watch request for a newly-mapped rbd image
it loops and tries again if the request returns ERANGE. Josh
mentioned a while ago this can happen for some reason that I
don't remember, and that trying again is the appropriate response.
But the code that sets up the watch event and tracks the osd
request for that watch doesn't clean up that state properly.
The watch request pointer stays non-null, and retrying will
overwrite that pointer. I haven't followed this through yet
but I doubt the ERANGE return will properly clean up the
request (which will have been registered to linger).
A quick fix would be to simply return the error--even if
it's ERANGE--and just fail the mapping.
Longer term though we should do this looping, but we need
to be able to clean up in the event of an error.
And doing that most likely depends on resolving this:
http://tracker.newdream.net/issues/3859