Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
client: getattr before returning quota/layout xattrs #14018
This addresses the user-checks-their-quota part of the problem, but not the (more important?) programmatic checks.
I think I mentioned in an email that the programmatic checks are a lot more dangerous because we don't want to go to the MDS on every write! So this is probably good on its own, but I don't think you can mark it as fixing http://tracker.ceph.com/issues/17939.
@gregsfortytwo the actual quota enforcement doesn't seem to be broken, or at least it's no more sloppy on remote adjustments than it is normally (the bug report was about the df output rather than what happened when they tried to write things).
I've added a test case here that demonstrates reduced quotas preventing writes when they're remotely adjusted.
I think I must be misunderstanding the way enforcing quotas and the virtual xattr are related to each other client-side then. I certainly thought Dan was saying they were having Manila issues with resizing volumes up, but maybe he just meant the output. Maybe run it by him?
maybe misunderstand, won't follow-up with code dive. Why am I justifying this to a computer? ;)
One test failure on this, where the volume client tests try to do some IO after a client is evicted -- mount.py does an is_mounted(), which does a statfs before trying to do any IO, and that statfs is hanging because the client is evicted and can't do its getattr.
I've updated the code to skip doing the getattr in statfs if there are stale sessions - it passes now.