Project

General

Profile

Bug #16357

radosgw stats error

Added by pengju jiao 12 months ago. Updated 8 months ago.

Status:
Need Review
Priority:
Normal
Target version:
-
Start date:
06/17/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

Description

First, create a bucket with name 'jstat01'.
Second, put a file to 'jstat' through s3cmd.
Third, query user stat with command ‘radosgw-admin user stats --uid=jstat’, it gives you right stat info.

[root@ceph05 ~]# radosgw-admin user stats --uid=jstat {
"stats": {
"total_entries": 19,
"total_bytes": 393216000,
"total_bytes_rounded": 393216000
},
"last_stats_sync": "2016-06-17 03:26:07.564420Z",
"last_stats_update": "2016-06-17 03:26:07.558036Z"
}

Then, create a same bucket wiht name 'jstat01' through s3cmd or sdk.
After that, query user stat with command ‘radosgw-admin user stats --uid=jstat’, it gives you error stat info.

[root@ceph05 ~]# s3cmd -c .s3cfg-jstat mb s3://jstat01
Bucket 's3://jstat01/' created
[root@ceph05 ~]# radosgw-admin user stats --uid=jstat {
"stats": {
"total_entries": 0,
"total_bytes": 0,
"total_bytes_rounded": 0
},
"last_stats_sync": "2016-06-17 03:26:07.564420Z",
"last_stats_update": "2016-06-17 03:29:25.672805Z"
}

All the stats became zero. If you query stat wiht using 'radosgw-admin user stats --uid=jstat --sync-stats ', the stats return to normal.

History

#1 Updated by Abhishek Lekshmanan 12 months ago

unless you pass the --sync-stats, the stats are synced only at a fixed interval iirc.

#2 Updated by pengju jiao 12 months ago

Abhishek Lekshmanan wrote:

unless you pass the --sync-stats, the stats are synced only at a fixed interval iirc.

Yes, I know the stats are synced only at a fixed interval iirc.
But the question is, when I make a request of creating a same bucket, the stats became zero. Is the processing logic right?
In my opinion, when an user create a same bucket whitch he already own, the stats should not be changed to zero.
Don't you think it is a bug?

#3 Updated by Abhishek Lekshmanan 11 months ago

pengju jiao wrote:

Abhishek Lekshmanan wrote:

unless you pass the --sync-stats, the stats are synced only at a fixed interval iirc.

Yes, I know the stats are synced only at a fixed interval iirc.
But the question is, when I make a request of creating a same bucket, the stats became zero. Is the processing logic right?
In my opinion, when an user create a same bucket whitch he already own, the stats should not be changed to zero.
Don't you think it is a bug?

Hmm didn't know this, yeah that doesn't sound right

#4 Updated by Abhishek Lekshmanan 11 months ago

  • Assignee set to Abhishek Lekshmanan

#5 Updated by Abhishek Lekshmanan 11 months ago

  • Status changed from New to In Progress

#6 Updated by Abhishek Lekshmanan 11 months ago

  • Status changed from In Progress to Need Review

#7 Updated by pengju jiao 11 months ago

Abhishek Lekshmanan wrote:

master pr: https://github.com/ceph/ceph/pull/10121

Thanks a lot. Can you backport the fixes to Jewel and Hammer ?

#8 Updated by Abhishek Lekshmanan 11 months ago

pengju jiao wrote:

Abhishek Lekshmanan wrote:

master pr: https://github.com/ceph/ceph/pull/10121

Thanks a lot. Can you backport the fixes to Jewel and Hammer ?

Once the pr gets merged in master, we can stage backports to older releases

#9 Updated by Orit Wasserman 11 months ago

  • Assignee changed from Abhishek Lekshmanan to Orit Wasserman

#10 Updated by Orit Wasserman 10 months ago

This no longer happens in master (it still does in hammer).
We need to figure out what exactly fixed it and backport that

#11 Updated by Nathan Cutler 10 months ago

@Orit: does it happen in jewel?

#12 Updated by Abhishek Lekshmanan 10 months ago

Possibly https://github.com/ceph/ceph/pull/9584? I'm still able to see the issue in master though

#13 Updated by pengju jiao 9 months ago

This problem always exists in v10.2.2。
The different is, when create same bucket in 10.2.2, the stats didn't become zero, but decreased.

[root@ceph01 ~]# radosgw-admin user stats --uid=jiaopengju {
"stats": {
"total_entries": 5,
"total_bytes": 1298938831,
"total_bytes_rounded": 1298939904
},
"last_stats_sync": "2016-09-10 02:51:13.131644Z",
"last_stats_update": "2016-09-10 02:51:13.130762Z"
}
[root@ceph01 ~]# s3cmd mb s3://jstat
Bucket 's3://jstat/' created

[root@ceph01 ~]# radosgw-admin user stats --uid=jiaopengju {
"stats": {
"total_entries": 4,
"total_bytes": 1194081231,
"total_bytes_rounded": 1194082304
},
"last_stats_sync": "2016-09-10 02:51:13.131644Z",
"last_stats_update": "2016-09-10 02:51:24.028592Z"
}

#14 Updated by pengju jiao 9 months ago

After query stats with using "radosgw-admin user stats --uid=jiaopengju --sync-stats", the stats go back to normal.

[root@ceph01 ~]# radosgw-admin user stats --uid=jiaopengju --sync-stats {
"stats": {
"total_entries": 5,
"total_bytes": 1298938831,
"total_bytes_rounded": 1298939904
},
"last_stats_sync": "2016-09-10 02:55:17.564786Z",
"last_stats_update": "2016-09-10 02:55:17.563847Z"
}

[root@ceph01 ~]# radosgw-admin user stats --uid=jiaopengju {
"stats": {
"total_entries": 5,
"total_bytes": 1298938831,
"total_bytes_rounded": 1298939904
},
"last_stats_sync": "2016-09-10 02:55:17.564786Z",
"last_stats_update": "2016-09-10 02:55:17.563847Z"
}

Howerver, when doing the operation "s3cmd mb s3://jstat " again, the stats go back wrong as above description.

#15 Updated by Orit Wasserman 8 months ago

I tried on latest master and cannot reproduce (I used s3cmd)

#16 Updated by Abhishek Lekshmanan 8 months ago

  • Needs Doc set to No

I'm still able to reproduce this in master; these are the steps I did

$ s3 -us create foobar
$ s3 -us put foobar/foo filename=somethign
$ radosgw-admin user stats --uid=testid
{
    "stats": {
        "total_entries": 0,
        "total_bytes": 0,
        "total_bytes_rounded": 0
    },
    "last_stats_sync": "0.000000",
    "last_stats_update": "2016-10-05 08:30:27.731310Z" 
}
$ radosgw-admin user stats --uid=testid --sync-stats
{
    "stats": {
        "total_entries": 1,
        "total_bytes": 5283,
        "total_bytes_rounded": 8192
    },
    "last_stats_sync": "2016-10-05 08:30:51.846234Z",
    "last_stats_update": "2016-10-05 08:30:51.827607Z" 
}
# Create the same bucket again
$ s3 -us create foobar
$ radosgw-admin user stats --uid=testid
{
    "stats": {
        "total_entries": 0,
        "total_bytes": 0,
        "total_bytes_rounded": 0
    },
    "last_stats_sync": "2016-10-05 08:30:51.846234Z",
    "last_stats_update": "2016-10-05 08:31:02.813602Z" 
}


can you verify if this is still applicable

Also available in: Atom PDF