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 2021578 - --noproxy option is ignored when you try to list available role, usage , service-level and addons
Summary: --noproxy option is ignored when you try to list available role, usage , serv...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: subscription-manager
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 9.0
Assignee: William Poteat
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On: 1859529
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-11-09 16:40 UTC by William Poteat
Modified: 2022-05-17 16:29 UTC (History)
8 users (show)

Fixed In Version: subscription-manager-1.29.21-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1859529
Environment:
Last Closed: 2022-05-17 15:58:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2871 0 None Merged 2021578: Remove proxy server test as it is unnecessary [M] 2021-11-15 06:19:13 UTC
Github candlepin subscription-manager pull 2874 0 None Merged connection: recognize proxy errors 2021-11-15 06:20:06 UTC
Red Hat Issue Tracker RHELPLAN-102196 0 None None None 2021-11-09 16:41:08 UTC
Red Hat Product Errata RHBA-2022:3984 0 None None None 2022-05-17 15:58:22 UTC

Comment 1 John Sefler 2021-11-10 17:26:24 UTC
As the QE maintainer of a regression test suit, I NEEDINFO to determine if change in response to the following scenario caused by the fix for this bug is acceptable? or fixable?  In my opinion the changed response is not wrong, but is not as helpful to the user as it used to be.  Take a look...


> Prior to the pull request https://github.com/candlepin/subscription-manager/pull/2871 ....

[root@kvm-04-guest08 ~]# rpm -q subscription-manager
subscription-manager-1.29.19-1.git.106.7a24d0f.el9.x86_64

[root@kvm-04-guest08 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --proxy=auto-services.usersys.redhat.com:31290
Proxy connection failed, please check your settings.

^^^^ The registration attempt is to a valid candlepin server, but the proxy port passed on the command line argument is bad thereby causing the "Proxy connection failed, please check your settings." response which is accurate and helpful to the user.

> After the pull request https://github.com/candlepin/subscription-manager/pull/2871 ....

[root@kvm-04-guest08 ~]# rpm -q subscription-manager
subscription-manager-1.29.19-1.git.119.033bf98.el9.x86_64

[root@kvm-04-guest08 ~]# subscription-manager register --username=testuser1 --password=password --org=admin --proxy=auto-services.usersys.redhat.com:31290
Unable to reach the server at rhsm-auto85-candlepin.usersys.redhat.com:8443/candlepin

^^^^ The exact same registration attempt to the same valid candlepin server through a bad proxy port states "Unable to reach the server at rhsm-auto85-candlepin.usersys.redhat.com:8443/candlepin".  While this is true, it is not as useful nor as accurate as the former "Proxy connection failed, please check your settings."


NEEDINFO to determine if the regressed response can be restore while keeping the fix for this bug 2021578.

Comment 2 Pino Toscano 2021-11-11 13:43:00 UTC
(In reply to John Sefler from comment #1)
> > After the pull request https://github.com/candlepin/subscription-manager/pull/2871 ....
> 
> [root@kvm-04-guest08 ~]# rpm -q subscription-manager
> subscription-manager-1.29.19-1.git.119.033bf98.el9.x86_64
> 
> [root@kvm-04-guest08 ~]# subscription-manager register --username=testuser1
> --password=password --org=admin
> --proxy=auto-services.usersys.redhat.com:31290
> Unable to reach the server at rhsm-auto85-candlepin.usersys.redhat.com:8443/candlepin

I found out (I think) that we are not reporting errors from the proxy correctly; I tried an attempt at detecting this situation:
https://github.com/candlepin/subscription-manager/pull/2874

Comment 3 Pino Toscano 2021-11-15 06:20:07 UTC
(In reply to Pino Toscano from comment #2)
> I found out (I think) that we are not reporting errors from the proxy
> correctly; I tried an attempt at detecting this situation:
> https://github.com/candlepin/subscription-manager/pull/2874

... which worked.

Comment 4 Archana Pandey 2021-11-22 14:17:25 UTC
Pre-verification: subscription-manager-1.29.21-1.el9.x86_64


Beaker Test information:
                         HOSTNAME=kvm-06-guest18.hv2.lab.eng.bos.redhat.com
                            JOBID=6021295
                         RECIPEID=11009315
                    RESULT_SERVER=
                           DISTRO=RHEL-9.0.0-20211121.d.7
                     ARCHITECTURE=x86_64

Let's first try to reproduce issue on subscription-manager: 1.29.18-2.el9

[root@kvm-06-guest18 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.29.18-2.el9

[root@kvm-06-guest18 ~]# subscription-manager service-level --list  
+-------------------------------------------+
           Available Service Levels
+-------------------------------------------+
Premium
Self-Support
[root@kvm-06-guest18 ~]# subscription-manager service-level --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
Proxy connection failed, please check your settings.                                                                                 <<<<< FAIL
[root@kvm-06-guest18 ~]# 
[root@kvm-06-guest18 ~]# subscription-manager usage --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
Proxy connection failed, please check your settings.                                                                                 <<<<< FAIL
[root@kvm-06-guest18 ~]# 
[root@kvm-06-guest18 ~]# subscription-manager role --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
Proxy connection failed, please check your settings.                                                                                 <<<<< FAIL                                                                 
[root@kvm-06-guest18 ~]# subscription-manager addons --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
Proxy connection failed, please check your settings.                                                                                 <<<<< FAIL
[root@kvm-06-guest18 ~]# 

=====================================================================================================================  

verifying issue on latest sub-man build - 


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

[root@kvm-06-guest18 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.29.21-1.el9
[root@kvm-06-guest18 ~]# 

[root@kvm-06-guest18 ~]# rpm -qa --changelog subscription-manager | grep 2021578
- 2021578: Remove proxy server test as it is unnecessary (wpoteat)
[root@kvm-06-guest18 ~]#
[root@kvm-06-guest18 ~]# 

[root@kvm-06-guest18 ~]# subscription-manager service-level --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
           Available Service Levels
+-------------------------------------------+                                      <<<< PASS
Premium
Self-Support
[root@kvm-06-guest18 ~]# subscription-manager role --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available role
+-------------------------------------------+                                      <<<< PASS
[root@kvm-06-guest18 ~]# subscription-manager usage --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available usage
+-------------------------------------------+                                      <<<< PASS
 - Production
[root@kvm-06-guest18 ~]# subscription-manager addons --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
There are no available values for the system purpose "addons" from the available subscriptions in this organization.         <<<< PASS
[root@kvm-06-guest18 ~]# 
[root@kvm-06-guest18 ~]# subscription-manager syspurpose service-level --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
           Available Service Levels
+-------------------------------------------+                                      <<<< PASS
Premium
Self-Support
[root@kvm-06-guest18 ~]# subscription-manager syspurpose role --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available role                                                      <<<< PASS
+-------------------------------------------+
[root@kvm-06-guest18 ~]# subscription-manager syspurpose usage --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available usage                                                      <<<< PASS
+-------------------------------------------+
 - Production
[root@kvm-06-guest18 ~]# 
[root@kvm-06-guest18 ~]# subscription-manager syspurpose addons --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
There are no available values for the system purpose "addons" from the available subscriptions in this organization.   <<<< PASS
[root@kvm-06-guest18 ~]# 
[root@kvm-06-guest18 ~]# subscription-manager unregister
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.
[root@kvm-06-guest18 ~]# subscription-manager register --username rhel9-stackablePool --password ****  --proxy absfd:3129
Proxy connection failed, please check your settings.
[root@kvm-06-guest18 ~]#


Actual results:
honored --noproxy option and successfully lists available roles, usage, service-level and addons 

Expected results:
Should list available roles, usage ,service-level and addons

Additional info:


Verification: PASSED

Comment 8 Rehana 2021-11-29 11:39:20 UTC
Verifying on :
=============

subscription management server: 3.2.21-1
subscription management rules: 5.41
subscription-manager: 1.29.21-1.el9

On a registered system: 
-----------------------


# rpm -qa --changelog subscription-manager | grep 2021578
- 2021578: Remove proxy server test as it is unnecessary (wpoteat)

# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.

# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: entitlement_rhsm_1
Password: 
The system has been registered with ID: d7891f96-83d0-41ca-9d90-fffd0166c1a2
The registered system name is: kvm-03-guest03.lab.eng.rdu2.redhat.com

# subscription-manager service-level --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
           Available Service Levels
+-------------------------------------------+
Self-Support
Standard

# subscription-manager role --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server

# subscription-manager usage --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Production

# subscription-manager addons --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
There are no available values for the system purpose "addons" from the available subscriptions in this organization.

# subscription-manager syspurpose service-level --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
           Available Service Levels
+-------------------------------------------+
Self-Support
Standard

# subscription-manager syspurpose role --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server

# subscription-manager syspurpose usage --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
+-------------------------------------------+
               Available usage
+-------------------------------------------+
 - Production

# subscription-manager syspurpose addons --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com
There are no available values for the system purpose "addons" from the available subscriptions in this organization.

# subscription-manager unregister
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.

# subscription-manager register --username entitlement_rhsm_1 --password=**** --proxy absfd:3129
Proxy connection failed, please check your settings.

On a unregistered system :
==========================

Demonstrating few scenarios on a unregistered system too 


# subscription-manager service-level --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com --username=entitlement_rhsm_1 --password=******
+-------------------------------------------+
           Available Service Levels
+-------------------------------------------+
Self-Support
Standard

# subscription-manager role --list  --proxy sadsad:3129 --noproxy=subscription.rhsm.stage.redhat.com --username=entitlement_rhsm_1 --password=*****
+-------------------------------------------+
               Available role
+-------------------------------------------+
 - Red Hat Enterprise Linux Server


noproxy option was honored during listing the system purpose values on both registered and unregistered system . 

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

Comment 10 errata-xmlrpc 2022-05-17 15:58:12 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 (new packages: subscription-manager), 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-2022:3984


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