You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by nathanejohnson <gi...@git.apache.org> on 2016/04/27 22:10:52 UTC

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

GitHub user nathanejohnson opened a pull request:

    https://github.com/apache/cloudstack/pull/1522

    Log asynchronous responses in the api log

    Currently API responses for synchronous calls are logged, but asynchronous call responses are not.  This pull request makes a minor modification that logs the response including the JobId of all asynchronous requests.
    
    As an example, here is what a stopVirtualMachine request looked like in the logs:
    
        2016-04-27 10:43:11,084 INFO  [a.c.c.a.ApiServer] (catalina-exec-3:ctx-37d9f693 ctx-d2368de3) (logid:3a0fad97) (userId=2 accountId=2 sessionId=AF8B1F726ACB5C3A637B8B300AA218A7) 10.103.0.207 -- GET command=stopVirtualMachine&id=f63b6fcc-e0b0-480f-8f7a-cba329634ba1&forced=false&response=json&_=1461771791036 200 
    
    After this modification, here is what the logs look like:
    
        2016-04-27 13:37:11,338 INFO  [a.c.c.a.ApiServer] (catalina-exec-6:ctx-915b5c84 ctx-a03152fa) (logid:66249df0) (userId=2 accountId=2 sessionId=9EF127EED5CA6E74797DFE487D980FAF) 10.103.0.207 -- GET command=stopVirtualMachine&id=f63b6fcc-e0b0-480f-8f7a-cba329634ba1&forced=false&response=json&_=1461782231194 200 {"stopvirtualmachineresponse":{"jobid":"5b9f4a9b-eabe-4fa4-849d-3d004bb65634"}}

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/myENA/cloudstack logjobid_master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1522.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 #1522
    
----
commit f0ed8b82d1da24ff1a2aa44ec102345e2131d0c8
Author: Simon Weller <si...@gmail.com>
Date:   2016-03-24T19:45:09Z

    Merge pull request #3 from apache/master
    
    Rebase

commit fd9e0e434ca3849407e3958a7aadfa7e5ff1fe3d
Author: Simon Weller <si...@gmail.com>
Date:   2016-04-04T14:29:03Z

    Merge pull request #5 from apache/master
    
    Update from ACS

commit 295c4e223ab449c093822b5f0d9b4d4b040f4752
Author: Simon Weller <si...@gmail.com>
Date:   2016-04-12T19:55:44Z

    Merge pull request #6 from apache/master
    
    Merge from ACS master

commit 3f85da5d0e174722c44b87a99f0a8d2fe57cd4df
Author: Aaron Hurt <ah...@anbcs.com>
Date:   2016-04-26T18:42:34Z

    Merge remote-tracking branch 'upstream/master'

commit 3e2a5f894c7383085a81fdafa653a5c8a5854b39
Author: Nathan Johnson <nj...@ena.com>
Date:   2016-04-27T19:49:50Z

    Log responses from asynchronous api commands
    
    This is mainly useful so that we can see the job ids in the logs
    whenever the job is created via the API.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:

    https://github.com/apache/cloudstack/pull/1522#issuecomment-215486826
  
    @swill This is Ready to Merge


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:

    https://github.com/apache/cloudstack/pull/1522#issuecomment-215248091
  
    @nathanejohnson This is a nice addition that will enable easier tracing of events as we pull them into logstash. So those out there using async job calls should greatly benefit from this for jobid tracing.
    
    //cc @swill @pdube  @PaulAngus


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by kiwiflyer <gi...@git.apache.org>.
Github user kiwiflyer commented on the pull request:

    https://github.com/apache/cloudstack/pull/1522#issuecomment-215486284
  
    Code is straight forward and makes sense. I validated it works in the lab.
    
    LGTM.
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1522#issuecomment-215463060
  
    This change is pretty straight forward and it has been manually verified by @koushik-das in addition to the output originally posted by @nathanejohnson.  I think this is ready to merge pending one more LGTM.  @kiwiflyer can you review this for me?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by swill <gi...@git.apache.org>.
Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1522#issuecomment-215493805
  
    its added to my merge queue.  I need to get through this queue today, it is getting long 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/1522


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Log asynchronous responses in the api log

Posted by koushik-das <gi...@git.apache.org>.
Github user koushik-das commented on the pull request:

    https://github.com/apache/cloudstack/pull/1522#issuecomment-215407693
  
    LGTM. Verified in api.log that job id is getting appended.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---