A 'fence and evict' client eviction command
Currently the "session evict" operation on the MDS admin socket will terminate the session, and release any capabilities held by that client. Other clients are then free to operate on the files that the evicted client might have been operating on.
This is unsafe if the evicted client is in the middle of doing some I/O: a new client might open a file, write some data to it, and have that data overwritten by the evicted client who hasn't yet relealised that he was evicted.
The correct procedure is:
- Blacklist the client
- Wait til the MDSs have all got the new post-blacklist-OSDMap
- Instruct all MDSs to terminate the client session
- Ensure that all other clients do not use any new caps until they have seen the post-blacklist OSDMap.
Can implement this in MDSMonitor using MCommands to the MDSs, on top of the OSD epoch barrier stuff built for #7317