cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolay Kabadjov <niki...@yahoo.com>
Subject Re: listUsageRecords fails after deleting an account
Date Fri, 11 Oct 2013 09:02:39 GMT
Short update: 
It turned out that deleted security groups ware in charge instead of deleted users.

We've managed to overcome by fixing the following codebase:  com.cloud.api.ApiResponseHelper.createUsageResponse

3259                 } else if(usageRecord.getUsageType() == UsageTypes.SECURITY_GROUP){
3260                         //Security Group Id
3261                         SecurityGroupVO sg = _entityMgr.findByIdIncludingRemoved(SecurityGroupVO.class,
usageRecord.getUsageId().toString());
3262                         usageRecResponse.setUsageId(sg.getUuid());
3263                 }


with 
3259                 } else if(usageRecord.getUsageType() == UsageTypes.SECURITY_GROUP){
3260                         //Security Group Id
3261                         SecurityGroupVO sg = _entityMgr.findByIdIncludingRemoved(SecurityGroupVO.class,
usageRecord.getUsageId().toString());
3262                         usageRecResponse.setUsageId( (sg!=null)? sg.getUuid():
"missing_security_group_" + usageRecord.getUsageId().toString() );
3263                 }

Regards,
Niki







On Thursday, October 10, 2013 8:01 PM, Nikolay Kabadjov <nikikab@yahoo.com> wrote:
 
Nope!
no stack trace 



On Thursday, October 10, 2013 7:58 PM, Alena Prokharchyk <Alena.Prokharchyk@citrix.com>
wrote:
 
On 10/10/13 9:31 AM, "Nikolay Kabadjov" <nikikab@yahoo.com> wrote:


>The only
 meaningfull line in the log is:
>2013-10-10 18:29:06,063 ERROR [cloud.api.ApiServer] (ApiServer-3:null)
>unhandled exception executing api command: listUsageRecords
>java.lang.NullPointerException
>
>
>
>
>On Thursday, October 10, 2013 6:46 PM, Nikolay Kabadjov
><nikikab@yahoo.com> wrote:
> 
>I've got the following response with no further explanation and no
>exceptions in the management-server.log related to the issue
>
>{
>    "listusagerecordsresponse": {
>        "errorcode": 530,
>       
 "cserrorcode": 9999
>    }
>}
>
>Any idea? 
>How could I overcome this peculiar situation?
>
>Thanks,
>Niki


Niki, is there a stack trace for the NPE? Without the line number its hard
to tell where it fails.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message