[openstack-dev] [neutron] Supporting retries in neutronclient

Carl Baldwin carl at ecbaldwin.net
Mon Jun 2 20:30:50 UTC 2014


+1.  After reading through this thread, I think that a blind --retries
N could be harmful and unwise given the current API definition.  Users
that need a retry for an SSL error are going to get in to the habit of
adding --retries N to all their calls and they'll end up in trouble
because they really should be taking action on the particular error
that occurs, not just retrying on any error.

Carl

On Tue, May 27, 2014 at 8:40 PM, Aaron Rosen <aaronorosen at gmail.com> wrote:
> Hi,
>
> Is it possible to detect when the ssl handshaking error occurs on the client
> side (and only retry for that)? If so I think we should do that rather than
> retrying multiple times. The danger here is mostly for POST operations (as
> Eugene pointed out) where it's possible for the response to not make it back
> to the client and for the operation to actually succeed.
>
> Having this retry logic nested in the client also prevents things like nova
> from handling these types of failures individually since this retry logic is
> happening inside of the client. I think it would be better not to have this
> internal mechanism in the client and instead make the user of the client
> implement retry so they are aware of failures.
>
> Aaron
>
>
> On Tue, May 27, 2014 at 10:48 AM, Paul Ward <wpward at us.ibm.com> wrote:
>>
>> Currently, neutronclient is hardcoded to only try a request once in
>> retry_request by virtue of the fact that it uses self.retries as the retry
>> count, and that's initialized to 0 and never changed.  We've seen an issue
>> where we get an ssl handshaking error intermittently (seems like more of an
>> ssl bug) and a retry would probably have worked.  Yet, since neutronclient
>> only tries once and gives up, it fails the entire operation.  Here is the
>> code in question:
>>
>>
>> https://github.com/openstack/python-neutronclient/blob/master/neutronclient/v2_0/client.py#L1296
>>
>> Does anybody know if there's some explicit reason we don't currently allow
>> configuring the number of retries?  If not, I'm inclined to propose a change
>> for just that.
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>



More information about the OpenStack-dev mailing list