You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "lwsa-leonardosouza (via GitHub)" <gi...@apache.org> on 2026/07/31 21:00:50 UTC
Re: [I] Ceph RGW bucket size reported as 0 in listBuckets/cmk despite non-zero RGW usage [cloudstack]
lwsa-leonardosouza commented on issue #13224:
URL: https://github.com/apache/cloudstack/issues/13224#issuecomment-5147419417
We are hitting the same problem, and I think I can add the missing piece — the exact error @abh1sar asked about and the root cause.
Root cause: BucketUsageTask throws an NPE on empty buckets, which aborts the whole run
On our environment the hourly BucketUsageTask fails with this exception on every run:
ERROR [o.a.c.s.o.B.BucketUsageTask] (Bucket-Usage-1) Error while fetching bucket usage
com.cloud.utils.exception.CloudRuntimeException: Cannot invoke
"org.twonote.rgwadmin4j.model.BucketInfo$Usage$RgwMain.getSize_kb()"
because the return value of "org.twonote.rgwadmin4j.model.BucketInfo$Usage.getRgwMain()" is null
The trigger is an empty bucket (0 objects). RGW only includes rgw.main in usage once a bucket has objects; for an empty bucket radosgw-admin bucket stats returns an empty usage ({}), so getUsage().getRgwMain() is null and .getSize_kb() throws. Because the exception propagates out of the task, the whole run aborts — every bucket iterated after the first empty one never gets its size updated and stays at size = 0. This also explains @jeanvetorello's note that "bucket usage records are also never generated". Buckets before the empty one are fine; the empty one and everything after are skipped. Suggested fix: null-check getRgwMain() (treat missing rgw.main as 0) and/or try/catch per bucket, in CephObjectStoreDriverImpl.java. Workaround: remove/populate empty buckets so every bucket has rgw.main.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org