cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre-Yves Ritschard (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-6472) GenerateUsageRecords generates NPEs for expunging instances
Date Wed, 23 Apr 2014 07:37:15 GMT


Pierre-Yves Ritschard commented on CLOUDSTACK-6472:

To reproduce:

1. Wait for cloud-usage to generate records for a running vm.
2. Delete the VM and wait for it to be in 'Expunged' state, it will have a non-null 'removed'
field in the vm_instance table
3. Issue the GenerateUsageRecords API command, it will fail and log a stack trace to the management-server

> GenerateUsageRecords generates NPEs for expunging instances
> -----------------------------------------------------------
>                 Key: CLOUDSTACK-6472
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Management Server, Usage
>    Affects Versions: 4.3.0
>         Environment: linux
>            Reporter: Pierre-Yves Ritschard
>         Attachments: 0001-handle-removed-entities.patch
> The GenerateUsageRecords 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.

This message was sent by Atlassian JIRA

View raw message