Fuel CLI uses global proxy settings for access to Nailgun

Bug #1459964 reported by Dennis Dmitriev
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Invalid
Medium
Roman Prykhodchenko

Bug Description

If one set global proxy on Fuel admin node, for example:

export http_proxy=http://10.109.20.1:3128/

, then Fuel CLI won't access to Nailgun, because it will use proxy for this action: "ERROR: The requested URL could not be retrieved", details here: http://paste.openstack.org/show/244364/

Global proxy setting is required for accessing repositories in cases when Internet allowed only through proxy from customer's admin network.

Changed in fuel:
importance: Undecided → High
Revision history for this message
Vladimir Kuklin (vkuklin) wrote :

folks, just add new variable called 'repo_http_proxy' and use it for repo proxying and the other one for FUEL CLI

Revision history for this message
Dennis Dmitriev (ddmitriev) wrote :

Will it be used in fuel-createmirror for making local repositories?

Revision history for this message
Ihor Kalnytskyi (ikalnytskyi) wrote :

Agree with Vova, the case is invalid, since it's ok that the fuelclient uses http_proxy variable. If we won't to use custom proxy for repo mirroring then there should be a way to specify it only for this script.

Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Actually the bug is kind of valid: there should be proxy settings to cover more scenarios but I really doubt that it's a High one.

Revision history for this message
Vitaly Parakhin (vparakhin) wrote :

We should consider setting the "no_proxy" environment variable - and its value should include master node IP address, i.e.

export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com,10.20.0.2"

Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

I've created bug #1460072 for possible options

Changed in fuel:
status: New → Incomplete
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Roman Prykhodchenko (romcheg)
status: Incomplete → In Progress
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Roman, what fix are you going to contribute. As I see we should improve our documentation for usage of http_proxy environment variable.

Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

@Dmitry: actually Vitaly suggested the solution that should be applied. It's not only the client which may experience this problem. There is a need to set up no_proxy variable to prevent a lot of different problems with different utils.

Dmitry Pyzhov (dpyzhov)
tags: added: docs module-client
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: In Progress → Confirmed
milestone: 6.1 → 7.0
Changed in fuel:
status: Confirmed → In Progress
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-fuelclient (master)

Change abandoned by Roman Prykhodchenko (<email address hidden>) on branch: master
Review: https://review.openstack.org/186691
Reason: This patch is supressed

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
status: In Progress → Confirmed
milestone: 7.0 → 8.0
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-fuelclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/230345

Changed in fuel:
status: Confirmed → In Progress
Dmitry Pyzhov (dpyzhov)
tags: removed: docs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/230345
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=7b387ec229084410ddc79bd10655115b239a9244
Submitter: Jenkins
Branch: master

commit 7b387ec229084410ddc79bd10655115b239a9244
Author: Roman Prykhodchenko <email address hidden>
Date: Fri Oct 2 09:17:21 2015 +0200

    Use requests-mock for old tests

    In order to be able to change HTTP client easily
    tests must not mock requests module themselves but
    use requests-mock instead.

    Since ols CLI is going to be removed there is no need in
    creating a common base test class. This patch separates
    base classes for old and new tests and utilizes requests-mock
    for mocking HTTP client properly.

    Change-Id: Ia0996cb07e6622306f7b9e2350d9e56344004e61
    Related-bug: #1459964

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/197918
Committed: https://git.openstack.org/cgit/stackforge/python-fuelclient/commit/?id=501f8fb17462cebe689195089e1332cd2d98c8dc
Submitter: Jenkins
Branch: master

commit 501f8fb17462cebe689195089e1332cd2d98c8dc
Author: Roman Prykhodchenko <email address hidden>
Date: Fri Oct 2 16:34:40 2015 +0200

    Use session to send HTTP requests

    requests.Session brings the following benefits which
    are not easily available by invoking requests.request():

     * Connection pooling
     * Common place for configuring all requests
     * Configurable auth mechanism for the future use

    This patch also introduces HTTP_TIMEOUT and HTTP_PROXY
    configuration options which are used to set the appropriate
    requests' parameters

    Closes-bug: #1459964
    Change-Id: Iaee70768a3790a7a25c047aba2d19a058facda21

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

As patch https://review.openstack.org/230345 was a part of this bug and it makes more mess than it fixes, this bug have to be reopen.

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

@Sebastian: could you please clarify, why this bug has to be re-opened? The patch you've mentioned, was a necessary refactoring for being able to change anything in HTTP client w/o touching tests in the future. The patch https://review.openstack.org/#/c/197918 that allowed to set custom proxy server is in place and so this bug is not valid.

Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

@Sebastian, I analyzed the feedback you left on review and it looks like it is not related to this bug. Check this one https://bugs.launchpad.net/fuel/+bug/1507512

Changed in fuel:
status: Incomplete → Fix Committed
Revision history for this message
Sebastian Kalinowski (prmtl) wrote :

It's related in a way that this change introduced new bugs and without reopening this bug it might took months to fix a bug introduced here.

Dmitry Pyzhov (dpyzhov)
tags: added: area-python
tags: added: on-verification
Revision history for this message
Artem Hrechanychenko (agrechanichenko) wrote :

Verified on RC2

[root@nailgun ~]# ifconfig |grep enp0s3
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
[root@nailgun ~]# ifconfig enp0s3
enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 10.109.10.2 netmask 255.255.255.0 broadcast 10.109.10.255
        inet6 fe80::662e:60ff:fe80:30 prefixlen 64 scopeid 0x20<link>
        ether 64:2e:60:80:00:30 txqueuelen 1000 (Ethernet)
        RX packets 4447016 bytes 2261103415 (2.1 GiB)
        RX errors 0 dropped 40 overruns 0 frame 0
        TX packets 7363406 bytes 7566236025 (7.0 GiB)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

[root@nailgun ~]# export http_proxy=http://10.109.20.1:3128/
[root@nailgun ~]# fuel node
Can't connect to Nailgun server!
Please check connection settings in your configuration file.

Changed in fuel:
status: Fix Committed → Confirmed
tags: removed: on-verification
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 8.0 → 9.0
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

Did you try to set up proxy in fuelclient's configuration?

Changed in fuel:
status: Confirmed → Incomplete
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :
Revision history for this message
Roman Prykhodchenko (romcheg) wrote :

@Artem Grechanichenko: Do you have any comments?

Changed in fuel:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.