ditahkk commented on issue #13057: URL: https://github.com/apache/cloudstack/issues/13057#issuecomment-5685959097
Related failure observed on CloudStack 4.22.1.1: when a type-29 usage record references a bucket that is absent even from `findByIdIncludingRemoved`, `listUsageRecords` returns HTTP 530 instead of returning the usage response. The exception is `Cannot invoke "com.cloud.storage.BucketVO.getUuid()" because "bucket" is null`. [ApiResponseHelper.java in 4.22.1.1](https://github.com/apache/cloudstack/blob/4.22.1.1/server/src/main/java/com/cloud/api/ApiResponseHelper.java#L4565) dereferences the lookup result through `getUuid()` and `getName()` without a null check. The same branch remains in current main, checked on 2026-09-15. This adds a response-handling failure to the stale-statistics problem described here. Normal soft deletion alone does not explain a lookup returning null. The cause of the missing bucket row in our case remains unknown. Suggested regression case: a BUCKET usage record whose bucket lookup returns null, included in an otherwise valid usage response. The API should handle the missing resource without failing the entire response. This is a proposed test, not a new reproduction run. Stopping the orphaned statistics source and clearing only the affected usage backlog restored the API in our environment. Subsequent completed aggregation runs did not recreate the orphaned usage. No upstream patch has been applied; the missing-resource guard still needs a fix independently of statistics cleanup. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
