Project

General

Profile

Actions

Bug #22202

closed

rgw_statfs should report the correct stats

Added by supriti singh over 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

On NFS-Ganesha/RGW client, "df" command returns 0 for all the fields. It's because the function (https://github.com/ceph/ceph/blob/master/src/rgw/rgw_file.cc#L1606) is setting values to UINT64_MAX. The attribute value in nfs-ganesha is then set to: 18446744073709551615 which is (ffffffffffffffff). It seems like this value is not acceptable when using df command.

Solution:
For the fields that report total cluster size:
1. In case of no quota, call the rados cluster_stat().
https://github.com/supriti/ceph/commit/182f453553adb29b7d9710228d78e7e5991f16cd

2. In case of quotas, we need to understand if nfs-ganesha client is exporting path or bucket.
- In case '/' is exported, we need to check if there is any user quota set. If yes, then report it.
- In case bucket is exported, we need to check if there is any bucket quota set. If yes, then report it.

If "df" is called from sub directory, report the bucket or object size/statistics.


Related issues 1 (0 open1 closed)

Copied to rgw - Backport #23231: luminous: rgw_statfs should report the correct statsResolvedNathan CutlerActions
Actions #1

Updated by Abhishek Lekshmanan over 6 years ago

  • Assignee set to supriti singh
Actions #2

Updated by Matt Benjamin over 6 years ago

  • Status changed from New to In Progress
Actions #3

Updated by Matt Benjamin over 6 years ago

The general approach sounds good. Coversation is happening on the attached branch.

Actions #4

Updated by Matt Benjamin over 6 years ago

ping?

Actions #5

Updated by supriti singh over 6 years ago

Matt Benjamin wrote:

ping?

Hi Matt,

Sorry for delay. I have picked up work again on this. I will update branch by next week.

Actions #6

Updated by supriti singh about 6 years ago

supriti singh wrote:

Matt Benjamin wrote:

ping?

Hi Matt,

Sorry for delay. I have picked up work again on this. I will update branch by next week.

https://github.com/ceph/ceph/pull/20093

Actions #7

Updated by Nathan Cutler about 6 years ago

  • Backport set to luminous
Actions #8

Updated by Yehuda Sadeh about 6 years ago

  • Status changed from In Progress to Pending Backport
Actions #9

Updated by Nathan Cutler about 6 years ago

  • Copied to Backport #23231: luminous: rgw_statfs should report the correct stats added
Actions #10

Updated by Nathan Cutler almost 6 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF