[openstack-dev] [all] Maintaining httplib2 python library
Cory Benfield
cory at lukasa.co.uk
Fri Mar 18 14:31:03 UTC 2016
> On 18 Mar 2016, at 13:57, Brian Haley <brian.haley at hpe.com> wrote:
>
> On 03/17/2016 06:04 PM, Doug Wiegley wrote:
>>>> Here is the non comprehensive list of usages based on what trees I
>>>> happen to have checked out (which is quite a few, but not all of
>>>> OpenStack for sure).
>>>>
>>>> I think before deciding to take over ownership of an upstream lib (which
>>>> is a large commitment over space and time), we should figure out the
>>>> migration cost. All the uses in Tempest come from usage in Glance IIRC
>>>> (and dealing with chunked encoding).
>>>>
>>>> Neutron seems to use it for a couple of proxies, but that seems like
>>>> requests/urllib3 might be sufficient.
>>>
>>> The Neutron team should talk to Cory Benfield (CC'd) and myself more about this if they run into problems. requests and urllib3 are a little limited with respect to proxies due to limitations in httplib itself.
>>>
>>> Both of us might be able to dedicate time during the day to fix this if Neutron/OpenStack have specific requirements that requests is not currently capable of supporting.
>>
>> Looks like neutron is using it to do HTTP requests via unix domain sockets. Unless I’m missing something, requests doesn’t support that directly. There are a couple of other libs that do, or we could monkey patch the socket. Or modify the agents to use localhost.
>
> We have to use Unix domain sockets in the metadata proxy because it's running in a namespace, so can't use localhost to talk to the agent. But we could use some other library of course.
>
Getting requests to talk over a Unix domain socket is not particularly tricky, and there are third-party libraries that hook into requests appropriately to make that happen. For example, the requests-unixsocket module exists that can do the appropriate things.
Cory
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160318/adf3a0c1/attachment.pgp>
More information about the OpenStack-dev
mailing list