Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-6472

listUsageRecords generates NPEs for expunging instances

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.0
    • Fix Version/s: 4.4.0, 4.3.1
    • Component/s: Management Server, Usage
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None
    • Environment:
      linux

      Description

      The listUsageRecords API command, pulls down the list of usage records in the cloud_usage database and augments records with information pulled from the cloud database.

      When dealing with instance records, only instances which are do not have a value for the removed field are considered. Unfortunately, since the output of _entityMgr.findById is not checked this means that Null Pointer Exceptions are generated when trying to access the output for expunged VMs.

      The attached patch fixes the issue and applies a similar fix for other similar cases.

        Attachments

        1. 0001-handle-removed-entities.patch
          7 kB
          Pierre-Yves Ritschard

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pyritschard Pierre-Yves Ritschard
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: