Bug 1072769

Summary: Wrong value for expired grace period retrieved over network
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: quotaAssignee: Petr Pisar <ppisar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 19CC: ovasik, ppisar, vg.aetera
Target Milestone: ---Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://sourceforge.net/p/linuxquota/bugs/115/
Whiteboard:
Fixed In Version: quota-4.01-12.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1066516 Environment:
Last Closed: 2014-05-02 13:17:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Pisar 2014-03-05 07:58:18 UTC
+++ This bug was initially created as a clone of Bug #1066516 +++

Trying to check the quota of a users from an nfs client, (the directory resists on an nfs filesystem), you get a huge value for grace period, instead of none.

[...]

Steps to Reproduce:
1. Set up an NFS server, with a local filesystem ext4, with quota enabled
2. Run quota -v  <username> on nfs server and you get the following output 
[root@server]# quota -v user1
Disk quotas for user user1 (uid 3059):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/mapper/HomeVG-StudentLV
                 178000  491520  501760            7771       0       0
/dev/mapper/MailVG-MailLV
                 254548* 244800  256000    none    1104       0       0

3. On an nfs client, that mount the above filesystem (with nfsv4 protocol)
if you issue the command 
quota -v user1, your get  a huge number for grace period instead of none

[root@nfsclient~]# quota -v user1
Disk quotas for user user1 (uid 3059):
     Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
csfs9:/mail/
                 254548* 244800  256000 49703days    1104       0       0
csfs7:/home/students/
                 178000  491520  501760            7771       0       0

Additional info:
[...]
For users that their grace period has not been expired, you get the correct number of days.
The grace period has also been defined on nfs server.Running edquota -t  on nfs server you get the output below :

Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
  Filesystem             Block grace period     Inode grace period
  /dev/mapper/HomeVG-StudentLV                  7days                  7days
  /dev/mapper/MailVG-MailLV                  7days                  7days

[...]
--- Additional comment from Petr Pisar on 2014-02-20 08:02:59 GMT ---

Thank you for the report. I can reproduce the issue with quota-3.17-21.el6.x86_64.

[...]
--- Additional comment from Petr Pisar on 2014-02-20 10:12:31 GMT ---

I forwarded the problem the upstream, as all versions of quota tools are affected and there is no bullet-proof solution due to badly designed RPC protocol the quota tools use.

----

All Fedoras are affected.

Comment 1 Fedora Update System 2014-03-05 08:34:10 UTC
quota-4.01-11.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/quota-4.01-11.fc20

Comment 2 Fedora Update System 2014-03-05 08:41:46 UTC
quota-4.01-9.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/quota-4.01-9.fc19

Comment 3 Fedora Update System 2014-03-15 15:04:21 UTC
quota-4.01-9.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2014-03-15 15:08:16 UTC
quota-4.01-11.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Petr Pisar 2014-05-02 13:16:27 UTC
*** Bug 1067353 has been marked as a duplicate of this bug. ***