RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1457197 - --noproxy option no longer match "*" for host names
Summary: --noproxy option no longer match "*" for host names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rhsm
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
: 1459504 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-31 09:57 UTC by Rehana
Modified: 2017-08-01 19:24 UTC (History)
7 users (show)

Fixed In Version: python-rhsm-1.19.9-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 19:24:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1648 0 None closed 1457197: Env. variable no_proxy=* is not ignored 2020-08-18 15:41:48 UTC
Red Hat Product Errata RHBA-2017:2083 0 normal SHIPPED_LIVE python-rhsm and subscription-manager bug fix and enhancement update 2017-08-01 18:14:19 UTC

Description Rehana 2017-05-31 09:57:23 UTC
Description of problem:
Due to the recent fix for this bug 1443164 , no_proxy variable no longer honours "*" to match any hostname 

Version-Release number of selected component (if applicable):

subscription management server: 2.1.1-1
subscription management rules: 5.23
subscription-manager: 1.19.17-1.el7
python-rhsm: 1.19.8-1.el7

How reproducible:
always


Steps to Reproduce:
1.set a bad proxy on the system

root@dhcp151-206 ~]# subscription-manager config --list | grep proxy
   no_proxy = []
   proxy_hostname = notarealproxy.example.com
   proxy_password = []
   proxy_port = 1100
   proxy_user = []

2. and try to register

[root@dhcp151-206 ~]# subscription-manager list --available --noproxy=*
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

3. [root@dhcp151-206 ~]# rpm -qa python-rhsm --changelog | grep 1443164
- 1443164: no_proxy match the host name when *.redhat.com is used



Actual results:
--noproxy=* doesnt match the hostname F21-candlepin.usersys.redhat.com

Expected results:
This used to work prior to the bug 1443164 fix

Additional info:
# subscription-manager version --noproxy=*
server type: Red Hat Subscription Management
subscription management server: 2.1.1-1
subscription management rules: 5.23
subscription-manager: 1.19.15-1.el7
python-rhsm: 1.19.6-1.el7


# subscription-manager config --list | grep proxy
   no_proxy = []
   proxy_hostname = notarealproxy.example.com
   proxy_password = []
   proxy_port = 1100
   proxy_user = []

# subscription-manager register --noproxy=* 
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Organization: admin
The system has been registered with ID: e9cc23c5-4067-4949-b2e8-50165a7da6c8 

[root@ibm-x3250m3-01 ~]# rpm -qa python-rhsm --changelog | grep 1443164
[root@ibm-x3250m3-01 ~]#

Comment 2 Rehana 2017-05-31 10:46:28 UTC
Additional note:
==============

the issue is observed when used the subscription-manager "--noproxy" option , it seems to be working when NO_PROXY environment variable is used 

# NO_PROXY=* HTTPS_PROXY=https://bad:password@auto-services.usersys.redhat.com:3128 subscription-manager register --username=testuser1 --org=admin --force --serverurl=F21-candlepin.usersys.redhat.com:8443/candlepin
Unregistering from: F21-candlepin.usersys.redhat.com:8443/candlepin
The system with UUID 985fb963-510d-49c3-a257-5b0e2bb96d9d has been unregistered
All local data removed
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with ID: 26437820-0d63-4598-8f29-0e202071fdda 

PASSED : * matches the hostname

# NO_PROXY=*.redhat.com HTTPS_PROXY=https://bad:password@auto-services.usersys.redhat.com:3128 subscription-manager register --username=testuser1 --org=admin --force --serverurl=F21-candlepin.usersys.redhat.com:8443/candlepin
Unregistering from: F21-candlepin.usersys.redhat.com:8443/candlepin
The system with UUID 26437820-0d63-4598-8f29-0e202071fdda has been unregistered
All local data removed
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Password: 
The system has been registered with ID: 11e22d2d-c3f8-481a-8df5-1ae575667961 

PASSED : *.redhat.com matches the hostname "F21-candlepin.usersys.redhat.com"


Also there is wrong paste in step 2 , it should have been a register out put like this

# subscription-manager register --noproxy=*
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

# subscription-manager config --list | grep proxy
   no_proxy = []
   proxy_hostname = notarealproxy.example.com
   proxy_password = []
   proxy_port = 1100
   proxy_user = []

Comment 3 John Sefler 2017-06-02 00:11:36 UTC
(In reply to Rehana from comment #2)
> , it seems to be working when NO_PROXY environment variable is used 

Yes it seems to be working when NO_PROXY environment variable is used, but it is failing when no_proxy (lowercase) is used...


PASSING "NO_PROXY" CASE....

[root@jsefler-rhel7 ~]# NO_PROXY=* https_proxy=https://bad-username:redhat@auto-services.usersys.redhat.com:3128 subscription-manager register --username=qa --force
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
The system with UUID 3c7e3f72-1bf0-4971-8f98-0c39eaae8077 has been unregistered
All local data removed
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Password: 
The system has been registered with ID: 51aef4e5-c538-4994-9014-24202fe99847 


FAILING "no_proxy" CASE...

[root@jsefler-rhel7 ~]# no_proxy=* https_proxy=https://bad-username:redhat@auto-services.usersys.redhat.com:3128 subscription-manager register --username=qa --force
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

Comment 6 Rehana 2017-06-08 10:04:37 UTC
Reproducing the failure : 
======================

subscription-manager: 1.19.17-1.el7
python-rhsm: 1.19.8-1.el7

root@dhcp150-207 ~]# cat /etc/rhsm/rhsm.conf | grep proxy_
proxy_hostname ==notarealproxy.example.com
proxy_port =1100
proxy_user =
proxy_password =

[root@dhcp150-207 ~]# subscription-manager register --noproxy=* 
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

[root@dhcp150-207 ~]# no_proxy=* https_proxy=https://bad-username:redhat@auto-services.usersys.redhat.com:3128 subscription-manager register 
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

Verifying on :
=============

subscription-manager: 1.19.18-1.el7
python-rhsm: 1.19.9-1.el7


[root@dhcp150-207 ~]# cat /etc/rhsm/rhsm.conf | grep proxy_
proxy_hostname ==notarealproxy.example.com
proxy_port =1100
proxy_user =
proxy_password =

[root@dhcp150-207 ~]# subscription-manager register --noproxy=* 
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Organization: admin
The system has been registered with ID: e7446ecc-b84d-420b-a210-ac694fe9b849 


with no_proxy ( lower case)  environment variable : 

[root@dhcp150-207 ~]# no_proxy=* https_proxy=https://bad-username:redhat@auto-services.usersys.redhat.com:3128 subscription-manager register 
Registering to: F21-candlepin.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Organization: admin

The system has been registered with ID: 84dd84d6-0135-48c8-90a7-3fb321a937bc 
[root@dhcp150-207 ~]# 

Observed that now both no_proxy(lower case ) --noproxy option  honours '*' to match any hostname .

Based on the above observations moving the bug to Verified!!!

Comment 7 Kevin Howell 2017-06-08 14:20:20 UTC
*** Bug 1459504 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2017-08-01 19:24:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2083


Note You need to log in before you can comment on or make changes to this bug.