Project

General

Profile

Bug #24133

mds: broadcast quota to relevant clients when quota is explicitly set

Added by Zhi Zhang 7 months ago. Updated 7 months ago.

Status:
Pending Backport
Priority:
High
Assignee:
Category:
Correctness/Safety
Target version:
Start date:
05/15/2018
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:

Description

We found client won't get quota updated for a long time under following case. We found this issue on Luminous, but it might be also existed on previous versions.

Steps to reproduce:
1. mount a ceph-fuse client-1 (for admin) on host-1 and set quota as follows.

[ceph@x1 ~]$ sudo setfattr -n ceph.quota.max_bytes -v 100000 /mnt/cephfs/test10/      
[ceph@x1 ~]$ sudo setfattr -n ceph.quota.max_bytes -v 200000 /mnt/cephfs/test10/test11/

2. unmount above ceph-fuse client-1
3. mount another ceph-fuse client-2 (for user) on host-2 and copy some files into sub-directory test11. Since test10's quota is less than test11's, quota will be exceeded first on test10.

[ceph@x2 ~]$ sudo cp config /mnt/cephfs/test10/test11/2
cp: error writing '/mnt/cephfs/test10/test11/2': Disk quota exceeded
cp: failed to extend '/mnt/cephfs/test10/test11/2': Disk quota exceeded

4. mount a ceph-fuse client-1 (for admin) on host-1 again and change test10's quota.

[ceph@x1 ~]$ sudo setfattr -n ceph.quota.max_bytes -v 200000 /mnt/cephfs/test10/

5. unmount above ceph-fuse client-1

6. continue copying files into sub-directory test11 on host-2. It will still return quota exceeded for a long time, or until explicitly call getfattr to get quota back.

[ceph@x2 ~]$ sudo cp config /mnt/cephfs/test10/test11/3
cp: error writing '/mnt/cephfs/test10/test11/3': Disk quota exceeded
cp: failed to extend '/mnt/cephfs/test10/test11/3': Disk quota exceeded

The reason is that MDS only broadcasts quota under two cases, but above case is not one of them. So I think we could broadcast quota to relevant clients proactively if quota is explicitly set by someone.


Related issues

Copied to fs - Backport #24205: luminous: mds: broadcast quota to relevant clients when quota is explicitly set Resolved
Copied to fs - Backport #24206: mimic: mds: broadcast quota to relevant clients when quota is explicitly set Resolved

History

#2 Updated by Patrick Donnelly 7 months ago

  • Assignee set to Zhi Zhang
  • Priority changed from Normal to High
  • Target version set to v13.2.0

#3 Updated by Patrick Donnelly 7 months ago

  • Status changed from New to Need Review

#4 Updated by Patrick Donnelly 7 months ago

  • Target version changed from v13.2.0 to v14.0.0
  • Backport set to mimic,luminous

#5 Updated by Patrick Donnelly 7 months ago

  • Status changed from Need Review to Pending Backport

#6 Updated by Nathan Cutler 7 months ago

  • Copied to Backport #24205: luminous: mds: broadcast quota to relevant clients when quota is explicitly set added

#7 Updated by Nathan Cutler 7 months ago

  • Copied to Backport #24206: mimic: mds: broadcast quota to relevant clients when quota is explicitly set added

Also available in: Atom PDF