----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/10151/#review18708 -----------------------------------------------------------
Ship it! Thanks Funs, forgot to apply it on master after I came back home. There is some issue with async maybe, will take another look at it during weekends, there is some other patches around json printing as well. Thanks for your patch, I've also added a patch to handle URLError; will publish a snapshot on pypi as soon as we apply the json patch. On master; commit 63fa086fcc8c4bd47109c76f45f024b71a4c6e94 Author: Rohit Yadav <bhais...@apache.org> Date: Fri Apr 5 22:42:07 2013 +0530 cli: Handle URLError, variable refactor used passed variable Signed-off-by: Rohit Yadav <bhais...@apache.org> commit 6e22843acb6bbd61260849fac171bba61ac6650f Author: Funs Kessen <f...@barred.org> Date: Fri Apr 5 22:25:34 2013 +0530 Cloudmonkey requester.py change to return clearer errors and implement a logic change for async calls. Applied from review request: https://reviews.apache.org/r/10151/ Signed-off-by: Rohit Yadav <bhais...@apache.org> - Rohit Yadav On March 29, 2013, 5:49 a.m., Funs Kessen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/10151/ > ----------------------------------------------------------- > > (Updated March 29, 2013, 5:49 a.m.) > > > Review request for cloudstack and Rohit Yadav. > > > Description > ------- > > Change to requester.py to make it give back the actual error that was thrown > by the API (the HTTPError bit). The rest is to catch the correct result code > and act accordingly on async requests. Initially async requests seemed to > work because of the sleep that was introduced before the second call and > usually the api would be able to respond within the sleep, the issue was > however that if a call would take longer another request would be spawned due > to the recursive call that was done on monkeyrequest, and so re-curse on > itself, a side effect of this was that it never gave the output of the > result, but rather that of the initial response for calls that would take > longer. A nice side effect is that the script no longer waits the interval > for every call it makes. > > > Diffs > ----- > > tools/cli/cloudmonkey/requester.py 5c4cd1e > > Diff: https://reviews.apache.org/r/10151/diff/ > > > Testing > ------- > > I have two scripts, the first monkey.sh, which creates a complete zone with > basic networking and waits till the systevms have succesfully booted. The > other a script called monkey-clean.sh which tears the entire stack down using > cloudmonkey. So this includes setting up the zone, physical networking, > networking, pod, cluster, hypervisors, primary and secondary storage. > > > Thanks, > > Funs Kessen > >