GitHub user karuturi opened a pull request: https://github.com/apache/cloudstack/pull/782
Cloudstack 8816 entityuuid missing in some of the events In some of the events generated, entity uuid was missing making it difficult to find the entity. Fixed the same. Tested it on rabbitmq instance. There are the events before after the fix: Before -------------------------------------------------------------------------------- routing_key: management-server.ActionEvent.ACCOUNT-DELETE.Account.* exchange: cloudstack-events message_count: 2 payload: {"eventDateTime":"2015-09-04 17:59:24 +0530","status":"Scheduled","description":"deleting User test4 (id: 28) and accountId \u003d 28","event":"ACCOUNT.DELETE","Account":"c09e2e81-8edc-4c27-b072-25005b522b63","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"} payload_bytes: 304 payload_encoding: string redelivered: False -------------------------------------------------------------------------------- routing_key: management-server.AsyncJobEvent.complete.Account.* exchange: cloudstack-events message_count: 0 payload: {"cmdInfo":"{\"id\":\"9dd3abc2-3f8b-4852-aa60-a74b234acb13\",\"response\":\"json\",\"sessionkey\":\"5ig1ItP2_5v-mgY4cVJbJN5hw_w\",\"ctxDetails\":\" {\\\"interface com.cloud.user.Account\\\":\\\"9dd3abc2-3f8b-4852-aa60-a74b234acb13\\\"} \",\"cmdEventType\":\"ACCOUNT.DELETE\",\"expires\":\"2015-09-07T11:11:56+0000\",\"ctxUserId\":\"2\",\"signatureversion\":\"3\",\"httpmethod\":\"GET\",\"uuid\":\"9dd3abc2-3f8b-4852-aa60-a74b234acb13\",\"ctxAccountId\":\"2\",\"ctxStartEventId\":\"447\"}","instanceType":"Account","jobId":"5004989d-0cde-4922-8afa-66bf38b75ea7","status":"SUCCEEDED","processStatus":"0","commandEventType":"ACCOUNT.DELETE","resultCode":"0","command":"org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd","jobResult":"org.apache.cloudstack.api.response.SuccessResponse/null/ {\"success\":true} ","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"} payload_bytes: 914 payload_encoding: string redelivered: False -------------------------------------------------------------------------------- After -------------------------------------------------------------------------------- routing_key: management-server.ActionEvent.ACCOUNT-DELETE.Account.5e45aa20-85e0-430c-95d2-75d531291625 exchange: cloudstack-events message_count: 2 payload: {"eventDateTime":"2015-09-04 17:55:41 +0530","status":"Scheduled","description":"deleting User test (id: 31) and accountId \u003d 31","event":"ACCOUNT.DELETE","entityuuid":"5e45aa20-85e0-430c-95d2-75d531291625","Account":"5e45aa20-85e0-430c-95d2-75d531291625","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"} payload_bytes: 355 payload_encoding: string redelivered: True -------------------------------------------------------------------------------- routing_key: management-server.AsyncJobEvent.complete.Account.0e171f4d-98f5-46c3-8099-fd08402b8f0d exchange: cloudstack-events message_count: 0 payload: {"cmdInfo":"{\"id\":\"0e171f4d-98f5-46c3-8099-fd08402b8f0d\",\"response\":\"json\",\"sessionkey\":\"U9HVbOWsaj-0lZJKPBETZ6qH-IU\",\"ctxDetails\":\" {\\\"interface com.cloud.user.Account\\\":\\\"0e171f4d-98f5-46c3-8099-fd08402b8f0d\\\"} \",\"cmdEventType\":\"ACCOUNT.DELETE\",\"expires\":\"2015-09-07T11:42:10+0000\",\"ctxUserId\":\"2\",\"signatureversion\":\"3\",\"httpmethod\":\"GET\",\"uuid\":\"0e171f4d-98f5-46c3-8099-fd08402b8f0d\",\"ctxAccountId\":\"2\",\"ctxStartEventId\":\"461\"}","instanceType":"Account","instanceUuid":"0e171f4d-98f5-46c3-8099-fd08402b8f0d","jobId":"297534ce-d2b8-4f6f-a0ba-c102d6cd219e","status":"SUCCEEDED","processStatus":"0","commandEventType":"ACCOUNT.DELETE","resultCode":"0","command":"org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd","jobResult":"org.apache.cloudstack.api.response.SuccessResponse/null/ {\"success\":true} ","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"} payload_bytes: 968 payload_encoding: string redelivered: False -------------------------------------------------------------------------------- You can merge this pull request into a Git repository by running: $ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8816 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cloudstack/pull/782.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #782 ---- commit 9404af255a6f56f9a69cec25bc6105afc6be1c42 Author: Rajani Karuturi <rajani.karut...@citrix.com> Date: 2015-09-07T11:42:49Z CLOUDSTACK-8816 Fixed entityUuid missing in some cases is events context parameters is Map<object,Object>. This has been used interchangeably with String and class object resulting the param value not being available in some cases if its put with object and get with class.forName() made the put and get consistent by using Object as key everywhere. commit 0198864e7942c1dce67a6f6a038642df2717c7ba Author: Rajani Karuturi <rajani.karut...@citrix.com> Date: 2015-09-07T11:48:01Z CLOUDSTACK-8816: instance uuid is missing in events for delete account instance uuid is populated from the getInstanceId of the command which is returning null. returning the correct value now. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---