← Back to team overview

fuel-dev team mailing list archive

Re: Question about proxy server for OSTF.

 

Folks, thank you.

We've used Tatyana recipe, it bypasses http proxy by replacing endpoint IP
address.

Thanks a lot.


2013/10/30 Mike Scherbakov <mscherbakov@xxxxxxxxxxxx>

> Roman - we can ask OpenStack community team for implementing required
> pieces into the client. Find me if you think we need this.
>
> Thanks,
>
>
> On Wed, Oct 30, 2013 at 8:16 PM, Tatyana Leontovich <
> tleontovich@xxxxxxxxxxxx> wrote:
>
>> You has several path to fix this problem:
>> 1 - Develop own light-weight client, that wiil be based on urllib3 or
>> requests and only request (get / post/ delete) on those uri that you want
>> to tests
>> 2 - When you try to initialize client  - do not request endpoint from
>> keystone, just do it by next way:
>> auth_url = self.config.identity.uri
>>         tenant_name = self.config.identity.admin_tenant_name
>>         ceilometer_url = self.config.ceilometer.api_url
>>         if not username:
>>             username = self.config.identity.admin_username
>>         if not password:
>>             password = self.config.identity.admin_password
>>         return ceilometer.api.client.Client(username=username,
>>                                                api_key=password,
>>                                                endpoint=ceilometer_uri
>> .... (all needed for client initialization))
>>
>> where  self.config.ceilometer.api_url will be defined in config.py
>> base_ip = public_vip or self.compute.controller_nodes[0]
>> endpoint = 'http://{0}:{1}/{2}'.format(
>>                 base_ip, port_here, 'version_here')
>>
>> (you can use initialization of heatclient and muranoclient as example.
>> This clients do not works trough proxy too. All needed things are placed in
>> config.py and nmanager.py)
>>
>> And I agreed with Vladimir - as for copy -paste
>>
>>
>>
>> On Wed, Oct 30, 2013 at 12:37 PM, Vladimir Kuklin <vkuklin@xxxxxxxxxxxx>wrote:
>>
>>> Roman, I think the easiest way is to patch corresponding libraries to
>>> support http proxy. Looks like this should be only the matter of copy-paste
>>> of code.
>>>
>>>
>>> On Wed, Oct 30, 2013 at 12:52 PM, Roman Sokolkov <rsokolkov@xxxxxxxxx>wrote:
>>>
>>>>  Hi, folks.
>>>>
>>>> Fuel uses http proxy on controller (i.e. 10.20.0.3:8888) to give
>>>> access for OSTF tests inside OpenStack networks. We've plunged in to
>>>> troubles w/ python-ceilometerclient. It is not support http_proxy, because
>>>> it based on httplib module that not support proxy from environment
>>>> variables.
>>>>
>>>> [root@fuel ~]# http_proxy=http://10.20.0.3:8888 ceilometer
>>>> --os-username=admin --os-password=admin
>>>> --os-tenant-id=6fc07efb143b4aada4052c1ec0154545 --os-auth-url=
>>>> http://10.20.0.3:5000/v2.0 meter-list
>>>> Error communicating with http://172.16.0.2:8777 [Errno 113] No route
>>>> to host
>>>>
>>>> but novaclient works like a charm
>>>>
>>>> [root@fuel ~]# http_proxy=http://10.20.0.3:8888 nova
>>>> --os-username=admin --os-password=admin
>>>> --os-tenant-id=6fc07efb143b4aada4052c1ec0154545 --os-auth-url=
>>>> http://10.20.0.3:5000/v2.0 list
>>>>
>>>> +--------------------------------------+-------+--------+------------+-------------+----------------------+
>>>> | ID                                   | Name  | Status | Task State |
>>>> Power State | Networks             |
>>>>
>>>> +--------------------------------------+-------+--------+------------+-------------+----------------------+
>>>> | 358da20a-e8ae-4d2a-afce-9ff866f6267a | new01 | ACTIVE | None       |
>>>> Running     | novanetwork=10.0.0.2 |
>>>> | 0e65a7cb-bed7-403b-9043-feadfb5f2149 | new02 | ACTIVE | None       |
>>>> Running     | novanetwork=10.0.0.4 |
>>>> | 831a198b-daea-4b85-a6ec-cce85861fcb2 | new03 | ACTIVE | None       |
>>>> Running     | novanetwork=10.0.0.5 |
>>>> | 13adf693-539f-40b9-bc87-af16ed45a016 | new04 | ACTIVE | None       |
>>>> Running     | novanetwork=10.0.0.6 |
>>>> | e8c46558-6f0c-4453-9a42-0c0e1df760c9 | new05 | ACTIVE | None       |
>>>> Running     | novanetwork=10.0.0.7 |
>>>> | ea443306-d2df-4fc2-9286-df74d4a48eb4 | new06 | ACTIVE | None       |
>>>> Running     | novanetwork=10.0.0.8 |
>>>>
>>>> +--------------------------------------+-------+--------+------------+-------------+----------------------+
>>>>
>>>> Also i've found that glanceclient also based on httplib and not works
>>>> w/ http_proxy. In OSTF for image tests used novaclient, not glanceclient.
>>>>
>>>> My question is... Is there any routing, iptables way(without proxy) to
>>>> provide access from master node to openstack networks?
>>>>
>>>> --
>>>> Regards, Roman Sokolkov
>>>>
>>>> --
>>>> Mailing list: https://launchpad.net/~fuel-dev
>>>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~fuel-dev
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>>
>>> --
>>> Yours Faithfully,
>>> Vladimir Kuklin,
>>> Senior Deployment Engineer,
>>> Mirantis, Inc.
>>> +7 (495) 640-49-04
>>> +7 (926) 702-39-68
>>> Skype kuklinvv
>>> 45bk3, Vorontsovskaya Str.
>>> Moscow, Russia,
>>> www.mirantis.com <http://www.mirantis.ru/>
>>> www.mirantis.ru
>>> vkuklin@xxxxxxxxxxxx <nveschikova@xxxxxxxxxxxx>
>>>
>>> --
>>> Mailing list: https://launchpad.net/~fuel-dev
>>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~fuel-dev
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>> --
>> Mailing list: https://launchpad.net/~fuel-dev
>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~fuel-dev
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Mike Scherbakov
>
> --
> Mailing list: https://launchpad.net/~fuel-dev
> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~fuel-dev
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Regards, Roman Sokolkov

References