Skip to content

listCapacity with fetchlatest parameter is causing RuntimeException #12397

Closed

Description

@abh1sar

problem

Image
2026-01-09 10:38:42,505 ERROR [o.a.c.f.m.MessageBusBase] (pool-22-thread-1:[]) (logid:) NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION! com.cloud.utils.exception.CloudRuntimeException: NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION!
        at org.apache.cloudstack.framework.messagebus.MessageBusBase.publish(MessageBusBase.java:168)
        at com.cloud.capacity.CapacityManagerImpl.updateCapacityForHost(CapacityManagerImpl.java:774)
        at com.cloud.alert.AlertManagerImpl$1.doInTransactionWithoutResult(AlertManagerImpl.java:301)
        at com.cloud.utils.db.TransactionCallbackNoReturn.doInTransaction(TransactionCallbackNoReturn.java:25)
        at com.cloud.utils.db.Transaction$2.doInTransaction(Transaction.java:48)
        at com.cloud.utils.db.Transaction.execute(Transaction.java:38)
        at com.cloud.utils.db.Transaction.execute(Transaction.java:45)
        at com.cloud.alert.AlertManagerImpl.lambda$recalculateHostCapacities$0(AlertManagerImpl.java:297)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
        at java.base/java.lang.Thread.run(Thread.java:840)

Change added in #11095

versions

4.20.2

The steps to reproduce the bug

  1. Call listCapacity with fetchlatest parameter

What to do about it?

No response

Activity

  1. added this to the 4.20.3 milestone on Jan 9, 2026
  2. added theissue type on Jan 9, 2026
  3. moved this from Todo to Dev In Progress in Apache CloudStack BugFest - Issueson Jan 14, 2026
  4. self-assigned this
    on Jan 14, 2026
  5. moved this from Dev In Progress to ready for Review in Apache CloudStack BugFest - Issueson Jan 14, 2026
  6. removed their assignment
    on Jan 14, 2026
  7. moved this from ready for Review to ready for Testing in Apache CloudStack BugFest - Issueson Jan 14, 2026
  8. self-assigned this
    on Jan 14, 2026
  9. moved this from ready for Testing to Done in Apache CloudStack BugFest - Issueson Jan 14, 2026
  10. moved this from Done to In Testing in Apache CloudStack BugFest - Issueson Jan 14, 2026
  11. DaanHoogland commented on Jan 14, 2026

    @DaanHoogland
    Contributor

    fixed in #12421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions