[openstack-dev] [qa][python-bindings] Reries on HTTP error in python bindings

2014-01-15 Thread Frittoli, Andrea (Cloud Services)
Hi all,

 

I've been working on a patch to ensure that all tempest tests are able to
handle rate limiting errors with automatic retries [0].

API tests already implement retries, however scenario tests don't, the main
reason being that scenario tests rely on the official python bindings, most
of which do not handle retries (with the exception of the swift client).

 

My approach so far has been to monkey-patch python-bindings in tempest to
add the retry logic, however a few pointed out that the right place to
implement the retries would be in the python bindings directly.

I filed a bug [1] about implementing retries in the various python bindings,
and I'd like to get some feedback from the community.

 

Even if  we have enough consensus about [1], I expect it might be a while
until all python bindings are updated. 

In the meanwhile I think we could go ahead with [0], and then start removing
the monkey-patch as soon as retries are implemented on the client side.

 

andrea

 

[0] https://review.openstack.org/#/c/61978/

[1] https://bugs.launchpad.net/python-novaclient/+bug/1263069 

 

 

-- 

Andrea Frittoli

IaaS Systems Engineering Team

HP Cloud Services



smime.p7s
Description: S/MIME cryptographic signature
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [qa][python-bindings] Reries on HTTP error in python bindings

2014-01-15 Thread Boris Pavlovic
Frittoli,

I don't think that this is a good idea. Because the main role of tempest is
to ensure that cloud works. So if it doesn't work we should change
something in deployment configuration or code to fix it. Not just hide with
monkey patches in tempest.


Probably you should try to implement retry logic in python clients?


Best regards,
Boris Pavlovic


On Wed, Jan 15, 2014 at 10:00 PM, Joe Gordon joe.gord...@gmail.com wrote:




 On Wed, Jan 15, 2014 at 5:28 AM, Frittoli, Andrea (Cloud Services) 
 fritt...@hp.com wrote:

 Hi all,



 I’ve been working on a patch to ensure that all tempest tests are able to
 handle rate limiting errors with automatic retries [0].

 API tests already implement retries, however scenario tests don’t, the
 main reason being that scenario tests rely on the official python bindings,
 most of which do not handle retries (with the exception of the swift
 client).



 My approach so far has been to monkey-patch python-bindings in tempest to
 add the retry logic, however a few pointed out that the right place to
 implement the retries would be in the python bindings directly.

 I filed a bug [1] about implementing retries in the various python
 bindings, and I’d like to get some feedback from the community.



 Even if  we have enough consensus about [1], I expect it might be a while
 until all python bindings are updated.

 In the meanwhile I think we could go ahead with [0], and then start
 removing the monkey-patch as soon as retries are implemented on the client
 side.


 Besides monkey patching being scary and dangerous, monkey patching the
 clients in tempest means that we are now gating the clients on if the
 monkey patch is still valid. So we can't change the clients in a way that
 would break the monkey patch.  Although we could put the monkey patching in
 a try/except clause as long as we don't exercise this in the gate.




 andrea



 [0] https://review.openstack.org/#/c/61978/

 [1] https://bugs.launchpad.net/python-novaclient/+bug/1263069





 --

 Andrea Frittoli

 IaaS Systems Engineering Team

 HP Cloud Services

 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



 ___
 OpenStack-dev mailing list
 OpenStack-dev@lists.openstack.org
 http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [qa][python-bindings] Reries on HTTP error in python bindings

2014-01-15 Thread Frittoli, Andrea (Cloud Services)
Thanks Joe,

 

Good point, gating the clients with monkey-patched clients could become
nasty.

I'll pursue the changing the clients option only then.

 

andrea

 

From: Joe Gordon [mailto:joe.gord...@gmail.com] 
Sent: 15 January 2014 18:01
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [qa][python-bindings] Reries on HTTP error in
python bindings

 

 

 

On Wed, Jan 15, 2014 at 5:28 AM, Frittoli, Andrea (Cloud Services)
fritt...@hp.com wrote:

Hi all,

 

I've been working on a patch to ensure that all tempest tests are able to
handle rate limiting errors with automatic retries [0].

API tests already implement retries, however scenario tests don't, the main
reason being that scenario tests rely on the official python bindings, most
of which do not handle retries (with the exception of the swift client).

 

My approach so far has been to monkey-patch python-bindings in tempest to
add the retry logic, however a few pointed out that the right place to
implement the retries would be in the python bindings directly.

I filed a bug [1] about implementing retries in the various python bindings,
and I'd like to get some feedback from the community.

 

Even if  we have enough consensus about [1], I expect it might be a while
until all python bindings are updated. 

In the meanwhile I think we could go ahead with [0], and then start removing
the monkey-patch as soon as retries are implemented on the client side.

 

Besides monkey patching being scary and dangerous, monkey patching the
clients in tempest means that we are now gating the clients on if the monkey
patch is still valid. So we can't change the clients in a way that would
break the monkey patch.  Although we could put the monkey patching in a
try/except clause as long as we don't exercise this in the gate.

 

 

andrea

 

[0] https://review.openstack.org/#/c/61978/

[1] https://bugs.launchpad.net/python-novaclient/+bug/1263069 

 

 

-- 

Andrea Frittoli

IaaS Systems Engineering Team

HP Cloud Services


___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

 



smime.p7s
Description: S/MIME cryptographic signature
___
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev