[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14805239#comment-14805239
 ] 

Rajani Karuturi edited comment on CLOUDSTACK-8816 at 9/18/15 9:43 AM:
----------------------------------------------------------------------

events for VM-CREATE doesnt contain resource uuids in some of the action events.

PR for this fix https://github.com/apache/cloudstack/pull/849

*before*
|                                         routing_key                           
              |     exchange      | message_count |                             
                                                                                
                                            payload                             
                                                                                
                                            | payload_bytes | payload_encoding 
| redelivered |
| 
management-server.UsageEvent.VM-CREATE.com-cloud-vm-VirtualMachine.d27b0db9-52e2-404f-aec6-d7779a44b1c5
 | cloudstack-events | 4             | 
{"id":"d27b0db9-52e2-404f-aec6-d7779a44b1c5","eventDateTime":"2015-09-18 
12:59:50 
+0530","event":"VM.CREATE","resource":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","zone":"84621fe3-b155-4d25-83aa-0a34dc71d5fd"}
                                                                   | 245        
   | string           | True        |
| management-server.ActionEvent.VM-CREATE.VirtualMachine.*                      
                          | cloudstack-events | 3             | 
{"eventDateTime":"2015-09-18 12:59:50 
+0530","status":"Created","description":"Successfully created entity for 
deploying Vm. Vm Id: 
44","event":"VM.CREATE","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                                             | 251           | 
string           | True        |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.d27b0db9-52e2-404f-aec6-d7779a44b1c5
             | cloudstack-events | 2             | {"eventDateTime":"2015-09-18 
12:59:50 +0530","status":"Scheduled","description":"starting Vm. Vm Id: 
44","event":"VM.CREATE","entityuuid":"d27b0db9-52e2-404f-aec6-d7779a44b1c5","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
 | 311           | string           | True        |
| management-server.ActionEvent.VM-CREATE.VirtualMachine.*                      
                          | cloudstack-events | 1             | 
{"eventDateTime":"2015-09-18 12:59:50 
+0530","status":"Started","description":"starting Vm. Vm Id: 
44","event":"VM.CREATE","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                                                                
              | 218           | string           | True        |
| management-server.ActionEvent.VM-CREATE.VirtualMachine.*                      
                          | cloudstack-events | 0             | 
{"eventDateTime":"2015-09-18 12:59:59 
+0530","status":"Completed","description":"Successfully completed starting Vm. 
Vm Id: 
44","event":"VM.CREATE","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                                                     | 243      
     | string           | True        |


*after*
|                                               routing_key                     
                          |     exchange      | message_count |                 
                                                                                
                                                                   payload      
                                                                                
                                                                               
| payload_bytes | payload_encoding | redelivered |
| 
management-server.UsageEvent.VM-CREATE.com-cloud-vm-VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
 | cloudstack-events | 4             | 
{"id":"468aac31-dfc3-43b1-9225-b1934956b0bc","eventDateTime":"2015-09-18 
14:35:16 
+0530","event":"VM.CREATE","resource":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","zone":"84621fe3-b155-4d25-83aa-0a34dc71d5fd"}
                                                                                
                  | 245           | string           | True        |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 3             | {"eventDateTime":"2015-09-18 
14:35:16 +0530","status":"Created","description":"Successfully created entity 
for deploying Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
 | 342           | string           | True        |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 2             | {"eventDateTime":"2015-09-18 
14:35:16 +0530","status":"Scheduled","description":"starting Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                | 311           | string           | True       
 |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 1             | {"eventDateTime":"2015-09-18 
14:35:17 +0530","status":"Started","description":"starting Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                  | 309           | string           | True     
   |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 0             | {"eventDateTime":"2015-09-18 
14:35:26 +0530","status":"Completed","description":"Successfully completed 
starting Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
         | 334           | string           | False       |



was (Author: rajanik):
events for VM-CREATE doesnt contain resource uuids in some of the action events.

*before*
|                                         routing_key                           
              |     exchange      | message_count |                             
                                                                                
                                            payload                             
                                                                                
                                            | payload_bytes | payload_encoding 
| redelivered |
| 
management-server.UsageEvent.VM-CREATE.com-cloud-vm-VirtualMachine.d27b0db9-52e2-404f-aec6-d7779a44b1c5
 | cloudstack-events | 4             | 
{"id":"d27b0db9-52e2-404f-aec6-d7779a44b1c5","eventDateTime":"2015-09-18 
12:59:50 
+0530","event":"VM.CREATE","resource":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","zone":"84621fe3-b155-4d25-83aa-0a34dc71d5fd"}
                                                                   | 245        
   | string           | True        |
| management-server.ActionEvent.VM-CREATE.VirtualMachine.*                      
                          | cloudstack-events | 3             | 
{"eventDateTime":"2015-09-18 12:59:50 
+0530","status":"Created","description":"Successfully created entity for 
deploying Vm. Vm Id: 
44","event":"VM.CREATE","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                                             | 251           | 
string           | True        |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.d27b0db9-52e2-404f-aec6-d7779a44b1c5
             | cloudstack-events | 2             | {"eventDateTime":"2015-09-18 
12:59:50 +0530","status":"Scheduled","description":"starting Vm. Vm Id: 
44","event":"VM.CREATE","entityuuid":"d27b0db9-52e2-404f-aec6-d7779a44b1c5","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
 | 311           | string           | True        |
| management-server.ActionEvent.VM-CREATE.VirtualMachine.*                      
                          | cloudstack-events | 1             | 
{"eventDateTime":"2015-09-18 12:59:50 
+0530","status":"Started","description":"starting Vm. Vm Id: 
44","event":"VM.CREATE","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                                                                
              | 218           | string           | True        |
| management-server.ActionEvent.VM-CREATE.VirtualMachine.*                      
                          | cloudstack-events | 0             | 
{"eventDateTime":"2015-09-18 12:59:59 
+0530","status":"Completed","description":"Successfully completed starting Vm. 
Vm Id: 
44","event":"VM.CREATE","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                                                     | 243      
     | string           | True        |


*after*
|                                               routing_key                     
                          |     exchange      | message_count |                 
                                                                                
                                                                   payload      
                                                                                
                                                                               
| payload_bytes | payload_encoding | redelivered |
| 
management-server.UsageEvent.VM-CREATE.com-cloud-vm-VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
 | cloudstack-events | 4             | 
{"id":"468aac31-dfc3-43b1-9225-b1934956b0bc","eventDateTime":"2015-09-18 
14:35:16 
+0530","event":"VM.CREATE","resource":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","zone":"84621fe3-b155-4d25-83aa-0a34dc71d5fd"}
                                                                                
                  | 245           | string           | True        |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 3             | {"eventDateTime":"2015-09-18 
14:35:16 +0530","status":"Created","description":"Successfully created entity 
for deploying Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
 | 342           | string           | True        |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 2             | {"eventDateTime":"2015-09-18 
14:35:16 +0530","status":"Scheduled","description":"starting Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                | 311           | string           | True       
 |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 1             | {"eventDateTime":"2015-09-18 
14:35:17 +0530","status":"Started","description":"starting Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
                                  | 309           | string           | True     
   |
| 
management-server.ActionEvent.VM-CREATE.VirtualMachine.468aac31-dfc3-43b1-9225-b1934956b0bc
             | cloudstack-events | 0             | {"eventDateTime":"2015-09-18 
14:35:26 +0530","status":"Completed","description":"Successfully completed 
starting Vm. Vm Id: 
48","event":"VM.CREATE","entityuuid":"468aac31-dfc3-43b1-9225-b1934956b0bc","entity":"com.cloud.vm.VirtualMachine","account":"bd73dc2e-35c0-11e5-b094-d4ae52cb9af0","user":"bd7ea748-35c0-11e5-b094-d4ae52cb9af0"}
         | 334           | string           | False       |


> rabbitMQ: generated events have wrong or missing uuids
> ------------------------------------------------------
>
>                 Key: CLOUDSTACK-8816
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8816
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>    Affects Versions: 4.3.2, 4.4.4, 4.5.2
>            Reporter: Rajani Karuturi
>            Assignee: Rajani Karuturi
>            Priority: Critical
>
> For many events, entity uuids are missing. One such example is below. 
> (updated in the comments with events before and after the changes)
> 1. create an account ppp
> 2,create few users under ppp account
> 3.delete the "ppp" account
> 4.check the rabbit mq  for generated events
> actual result:
> Therecieved event has admin user uuid instead of deleted account uuid
> The server reported 0 messages remaining.
> Exchange      cloudstack-events
> Routing Key   management-server.AsyncJobEvent.complete.Account.*
> Redelivered   ●
> Properties    
> priority:     0
> delivery_mode:        2
> content_type: text/plain
> Payload 885 bytes Encoding: string    
> {"cmdInfo":"{\"id\":\"d08d73a5-b577-4082-a959-114b433979f1\",\"response\":\"json\",\"sessionkey\":\"bYp8fdaTPgTYLtuVlSPxnHj9Iuk\\u003d\",\"ctxDetails\":\"{\\\"com.cloud.user.Account\\\":\\\"d08d73a5-b577-4082-a959-114b433979f1\\\"}\",\"cmdEventType\":\"ACCOUNT.DELETE\",\"ctxUserId\":\"2\",\"httpmethod\":\"GET\",\"_\":\"1416046428981\",\"uuid\":\"d08d73a5-b577-4082-a959-114b433979f1\",\"ctxAccountId\":\"2\",\"ctxStartEventId\":\"271\"}","instanceType":"Account","instanceUuid":"","jobId":"0749f13f-517b-4cba-81f2-c9a9d23445cd","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":"fcf6dd7e-6983-11e4-bb12-0662940000db","user":"fcf71ae6-6983-11e4-bb12-0662940000db"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to