You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Prasanna Santhanam <ts...@apache.org> on 2013/07/18 08:28:30 UTC

CallContexts?

I see the following repeated lines with API calls on master code
lately: What's the call context? and what's the role?

2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext] (RouterStatusMonitor-1:ctx-9bb138b4) Context removed CallContext[acct=1; user=1; session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]

 * CallContext records information about the environment the call is made.  This
 * class must be always be available in all CloudStack code.

Does this mean we have to do something special when creating new APIs? I'm not
quite clear from this description.

Thanks,



-- 
Prasanna.,

------------------------
Powered by BigRock.com


Re: CallContexts?

Posted by Murali Reddy <Mu...@citrix.com>.
"Ipc framework and events framework needs to add this."

Alex, what specifically events framework need to handle this? Till 4.2,
UserContext was used to keep info like entity type, entity UUID, event
description etc in the UserContext. With CallContext, I see storing entity
details in CallContext is regressed, I will fix it. Let me know if there
is 
anything else to be aware.

Also, CallContext is relevant only for API triggered asyn jobs? Or context
is used for internal VMWork asyn job used by vmsync?

On 19/07/13 8:15 AM, "Alex Huang" <Al...@citrix.com> wrote:

>I wrote a small wiki page on what we want to do with CallContext.  Please
>have a read and comment.
>
>https://cwiki.apache.org/confluence/display/CLOUDSTACK/Using+CallContext
>
>--Alex
>
>
>> -----Original Message-----
>> From: Kelven Yang [mailto:kelven.yang@citrix.com]
>> Sent: Thursday, July 18, 2013 2:22 PM
>> To: dev@cloudstack.apache.org
>> Subject: Re: CallContexts?
>> 
>> CallContext was renamed from original UserContext. The semantic is
>>pretty
>> much the same as before to API calls
>> 
>> Kelven
>> 
>> On 7/18/13 1:25 AM, "Prasanna Santhanam" <ts...@apache.org> wrote:
>> 
>> >On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
>> >> I see the following repeated lines with API calls on master code
>> >> lately: What's the call context? and what's the role?
>> >>
>> >> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext]
>> >>(RouterStatusMonitor-1:ctx-9bb138b4) Context removed
>> >>CallContext[acct=1; user=1;
>> >>session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
>> >>
>> >>  * CallContext records information about the environment the call is
>> >>made.  This
>> >>  * class must be always be available in all CloudStack code.
>> >>
>> >> Does this mean we have to do something special when creating new
>>APIs?
>> >>I'm not
>> >> quite clear from this description.
>> >>
>> >It seems from the logs that all APIs are now getting the context as
>> >user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.
>> >
>> >
>> >
>> >--
>> >Prasanna.,
>> >
>> >------------------------
>> >Powered by BigRock.com
>> >
>
>



RE: CallContexts?

Posted by Alex Huang <Al...@citrix.com>.
I wrote a small wiki page on what we want to do with CallContext.  Please have a read and comment.

https://cwiki.apache.org/confluence/display/CLOUDSTACK/Using+CallContext

--Alex


> -----Original Message-----
> From: Kelven Yang [mailto:kelven.yang@citrix.com]
> Sent: Thursday, July 18, 2013 2:22 PM
> To: dev@cloudstack.apache.org
> Subject: Re: CallContexts?
> 
> CallContext was renamed from original UserContext. The semantic is pretty
> much the same as before to API calls
> 
> Kelven
> 
> On 7/18/13 1:25 AM, "Prasanna Santhanam" <ts...@apache.org> wrote:
> 
> >On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
> >> I see the following repeated lines with API calls on master code
> >> lately: What's the call context? and what's the role?
> >>
> >> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext]
> >>(RouterStatusMonitor-1:ctx-9bb138b4) Context removed
> >>CallContext[acct=1; user=1;
> >>session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
> >>
> >>  * CallContext records information about the environment the call is
> >>made.  This
> >>  * class must be always be available in all CloudStack code.
> >>
> >> Does this mean we have to do something special when creating new APIs?
> >>I'm not
> >> quite clear from this description.
> >>
> >It seems from the logs that all APIs are now getting the context as
> >user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.
> >
> >
> >
> >--
> >Prasanna.,
> >
> >------------------------
> >Powered by BigRock.com
> >


Re: CallContexts?

Posted by Kelven Yang <ke...@citrix.com>.
CallContext was renamed from original UserContext. The semantic is pretty
much the same as before to API calls

Kelven

On 7/18/13 1:25 AM, "Prasanna Santhanam" <ts...@apache.org> wrote:

>On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
>> I see the following repeated lines with API calls on master code
>> lately: What's the call context? and what's the role?
>> 
>> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext]
>>(RouterStatusMonitor-1:ctx-9bb138b4) Context removed CallContext[acct=1;
>>user=1; session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
>> 
>>  * CallContext records information about the environment the call is
>>made.  This
>>  * class must be always be available in all CloudStack code.
>> 
>> Does this mean we have to do something special when creating new APIs?
>>I'm not
>> quite clear from this description.
>> 
>It seems from the logs that all APIs are now getting the context as
>user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.
>
>
>
>-- 
>Prasanna.,
>
>------------------------
>Powered by BigRock.com
>


RE: CallContexts?

Posted by Alex Huang <Al...@citrix.com>.
Nice!  Much appreciated!

--Alex

> -----Original Message-----
> From: Chiradeep Vittal
> Sent: Thursday, July 25, 2013 2:44 AM
> To: dev@cloudstack.apache.org
> Cc: Alex Huang
> Subject: Re: CallContexts?
> 
> Fixed
> commit 1744ed7ad5b512135e567576271e11a6e26e4379
> 
> 
> Alex, please review.
> 
> On 7/25/13 11:53 AM, "Chiradeep Vittal" <Ch...@citrix.com>
> wrote:
> 
> >I can confirm this serious bug on master.
> >
> >On 7/18/13 1:55 PM, "Prasanna Santhanam" <ts...@apache.org> wrote:
> >
> >>On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
> >>> I see the following repeated lines with API calls on master code
> >>> lately: What's the call context? and what's the role?
> >>>
> >>> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext]
> >>>(RouterStatusMonitor-1:ctx-9bb138b4) Context removed
> >>>CallContext[acct=1; user=1;
> >>>session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
> >>>
> >>>  * CallContext records information about the environment the call is
> >>>made.  This
> >>>  * class must be always be available in all CloudStack code.
> >>>
> >>> Does this mean we have to do something special when creating new
> APIs?
> >>>I'm not
> >>> quite clear from this description.
> >>>
> >>It seems from the logs that all APIs are now getting the context as
> >>user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.
> >>
> >>
> >>
> >>--
> >>Prasanna.,
> >>
> >>------------------------
> >>Powered by BigRock.com
> >>
> >


Re: CallContexts?

Posted by Chiradeep Vittal <Ch...@citrix.com>.
Fixed
commit 1744ed7ad5b512135e567576271e11a6e26e4379


Alex, please review.

On 7/25/13 11:53 AM, "Chiradeep Vittal" <Ch...@citrix.com>
wrote:

>I can confirm this serious bug on master.
>
>On 7/18/13 1:55 PM, "Prasanna Santhanam" <ts...@apache.org> wrote:
>
>>On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
>>> I see the following repeated lines with API calls on master code
>>> lately: What's the call context? and what's the role?
>>> 
>>> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext]
>>>(RouterStatusMonitor-1:ctx-9bb138b4) Context removed CallContext[acct=1;
>>>user=1; session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
>>> 
>>>  * CallContext records information about the environment the call is
>>>made.  This
>>>  * class must be always be available in all CloudStack code.
>>> 
>>> Does this mean we have to do something special when creating new APIs?
>>>I'm not
>>> quite clear from this description.
>>> 
>>It seems from the logs that all APIs are now getting the context as
>>user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.
>>
>>
>>
>>-- 
>>Prasanna.,
>>
>>------------------------
>>Powered by BigRock.com
>>
>


Re: CallContexts?

Posted by Chiradeep Vittal <Ch...@citrix.com>.
I can confirm this serious bug on master.

On 7/18/13 1:55 PM, "Prasanna Santhanam" <ts...@apache.org> wrote:

>On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
>> I see the following repeated lines with API calls on master code
>> lately: What's the call context? and what's the role?
>> 
>> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext]
>>(RouterStatusMonitor-1:ctx-9bb138b4) Context removed CallContext[acct=1;
>>user=1; session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
>> 
>>  * CallContext records information about the environment the call is
>>made.  This
>>  * class must be always be available in all CloudStack code.
>> 
>> Does this mean we have to do something special when creating new APIs?
>>I'm not
>> quite clear from this description.
>> 
>It seems from the logs that all APIs are now getting the context as
>user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.
>
>
>
>-- 
>Prasanna.,
>
>------------------------
>Powered by BigRock.com
>


Re: CallContexts?

Posted by Prasanna Santhanam <ts...@apache.org>.
On Thu, Jul 18, 2013 at 11:58:30AM +0530, Prasanna Santhanam wrote:
> I see the following repeated lines with API calls on master code
> lately: What's the call context? and what's the role?
> 
> 2013-07-18 11:52:24,372 DEBUG [cloudstack.context.CallContext] (RouterStatusMonitor-1:ctx-9bb138b4) Context removed CallContext[acct=1; user=1; session=9bb138b4-29c1-4ddf-ab47-9307a600d31e]
> 
>  * CallContext records information about the environment the call is made.  This
>  * class must be always be available in all CloudStack code.
> 
> Does this mean we have to do something special when creating new APIs? I'm not
> quite clear from this description.
> 
It seems from the logs that all APIs are now getting the context as
user=1,account=1 (SYSTEM). Filed CLOUDSTACK-3626.



-- 
Prasanna.,

------------------------
Powered by BigRock.com