cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Grizzanti <david.grizza...@sungard.com>
Subject Re: Entity UUID and Type missing on ActionEvent event notifications
Date Wed, 20 Nov 2013 16:23:43 GMT
Thanks for the feedback and info on the existing bug filed for this.

Nitin - I was originally thinking along the lines of what Murali has recently commented (i.e.
adding Entity Details in the UserContext in all the places where an Action Event is generated).
 The particular case I was using this for when I found the issue was for creating a network,
which is not an async job.  The AsyncJobManager I believe it generating a different type
of event that what I was originally looking at.

Let me know your thoughts.

Thanks

-- 
David Grizzanti
Software Engineer
Sungard Availability Services

e: david.grizzanti@sungard.com
w: 215.446.1431
c: 570.575.0315

On November 20, 2013 at 2:45:50 AM, Murali Reddy (murali.reddy@citrix.com) wrote:



On 20/11/13 2:15 AM, "David Grizzanti" <david.grizzanti@sungard.com> wrote:  

>Hi All,  
>  
>I noticed that the event messages going to rabbitmq of type "ActionEvent"  
>are missing any reference to the entity Id/UUID. Was this omission  
>intentional? Poking through the code, I was able to find that adding the  
>information on to the event is fairly straightforward (albeit a bit  
>tedious). Does anyone have any objections to updating these event types  
>with this information? I can file the appropriate Jira, but wanted to  
>check in with the list first to get opinions.  

David,  

Omission is not intentional. Please see [1] for earlier discussion. There  
is a bug opened as well[2].  

If you see ActionEventUtils, there is code that gets 'entity type' and  
'entity uuid' from the CallContext and fills the details on the message  
published. I added this as generic mechanism. Unfortunately, there is not  
a single place where if you populate the entity type and uuid in the call  
context then things would fall in place. So its tedious job of adding the  
entity type and uuid details to the call context to all the methods  
annotated with 'ActionEvent', but other wise it is a much needed fix.  

[1]  
http://mail-archives.apache.org/mod_mbox/cloudstack-dev/201306.mbox/%3CCDF1  
DB6A.424D9%25murali.reddy@citrix.com%3E  
[2] https://issues.apache.org/jira/browse/CLOUDSTACK-3190  


> Example event for network creation below.  
>  
>Thanks  
>  
>----------  
>@source="management-server", @type="ActionEvent",  
>@action="NETWORK-CREATE", @resource_type="Network", @resource_id="*">  
>{  
> "status": "Completed",  
> "event": "NETWORK.CREATE",  
> "account": "6d836cf8-47cd-11e3-a130-606d02c0c082",  
> "user": "6d838544-47cd-11e3-a130-606d02c0c082"  
>}  
>  
>--  
>David Grizzanti  
>Software Engineer  
>Sungard Availability Services  
>  
>e: david.grizzanti@sungard.com  
>w: 215.446.1431  
>c: 570.575.0315  




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message