Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1880920

Summary: no warning message is displayed when you try to add invalid addons
Product: Red Hat Enterprise Linux 8 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: Pino Toscano <ptoscano>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: jsefler, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: 8.5Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.16-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 19:37:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Shwetha Kallesh 2020-09-21 06:58:36 UTC
Description of problem:
no warning message is displayed when you try to add invalid addons

Version-Release number of selected component (if applicable):
[root@kvm-01-guest12 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.20-1
subscription management rules: 5.41
subscription-manager: 1.27.16-1.el8


How reproducible:


Steps to Reproduce:
[root@kvm-01-guest12 ~]# subscription-manager addons --add Foobar1 --username=testuser1 --password=password --org=admin
addons updated.
^^ warning message is displayed

[root@kvm-01-guest12 ~]# syspurpose show
{
  "addons": [
    "Foobar1"
  ],
}


Actual results:
no warning message is displayed

Expected results:
Warning message should be displayed

Additional info:

Comment 1 John Sefler 2020-09-21 12:43:39 UTC
Just to be clear on this bugzilla, the behavior is currently...

[root@rhsm-auto8-client2 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.1.20-1
subscription management rules: 5.41
subscription-manager: 1.27.16-1.el8

[root@rhsm-auto8-client2 ~]# subscription-manager addons --list --username=testuser1 --password=password --org=admin
+-------------------------------------------+
              Available addons
+-------------------------------------------+
 - ADDON1
 - ADDON3
 - ADDON2
[root@rhsm-auto8-client2 ~]# subscription-manager addons --add Foobar --username=testuser1 --password=password --org=admin
addons updated.
[root@rhsm-auto8-client2 ~]# 


The expected results for adding an unavailable addon is...
Warning: Provided value "Foobar" is not included in the list of valid values
 - ADDON1
 - ADDON3
 - ADDON2
addons updated.

Comment 4 Shwetha Kallesh 2021-04-27 09:58:34 UTC
Reproducer :

[root@kvm-04-guest15 ~]# subscription-manager addons --add Foobar1 --username=testuser1 --password=password --org=admin
addons updated.
[root@kvm-04-guest15 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.16-1
subscription management rules: 5.41
subscription-manager: 1.28.13-2.el8

Comment 5 Shwetha Kallesh 2021-04-27 10:01:17 UTC
pre-verification comments:

[root@kvm-04-guest15 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 3.2.11-1
subscription management rules: 5.41
subscription-manager: 1.28.16-1.el8


[root@kvm-04-guest15 ~]# subscription-manager register
Registering to: shwetha-workstation.usersys.redhat.com:8443/candlepin
Username: admin
Password: 
Hint: User "admin" is member of following organizations: donaldduck, snowwhite, admin
Organization: admin
The system has been registered with ID: f9da42e9-518a-4d3b-8d7f-6de858586e8f
The registered system name is: kvm-04-guest15.lab.eng.rdu2.redhat.com
[root@kvm-04-guest15 ~]# subscription-manager addons --add Foobar1
Warning: Provided value "Foobar1" is not included in the list of valid values
 - ADDON1
 - ADDON3
 - ADDON2
addons updated.
^^ observe the warning message along with valid values that are available for that account

[root@kvm-04-guest15 ~]# subscription-manager unregister
Unregistering from: shwetha-workstation.usersys.redhat.com:8443/candlepin
System has been unregistered.


[root@kvm-04-guest15 ~]# subscription-manager addons --add Foobar1 --username=testuser1 --password=password --org=admin
Warning: Provided value "Foobar1" is not included in the list of valid values
 - ADDON1
 - ADDON3
 - ADDON2
addons updated.
^^ observe the warning message along with valid values that are available for that account

Comment 8 Rehana 2021-05-18 15:34:09 UTC
Verifying on : 
=============

# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.1.0-1
subscription management rules: 5.41
subscription-manager: 1.28.16-1.el8

Verifying on server that has addons entries available :
=======================================================
# subscription-manager addons --add Foobar1
Warning: Provided value "Foobar1" is not included in the list of valid values
 - ADDON3
 - ADDON2
 - ADDON1
addons updated.

# syspurpose show
The 'syspurpose' command is deprecated and will be removed in a future major release. Please use the 'subscription-manager syspurpose' command going forward.
{
  "addons": [
    "Foobar1"
  ]
}

Verifying Against a sever that does not have any addons available 
==========================================================
# subscription-manager addons --add Foobar1
Warning: the list of valid values for attribute "addons" is empty.
addons updated.


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

Comment 10 errata-xmlrpc 2021-11-09 19:37:35 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 (subscription-manager bug fix and enhancement update), 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-2021:4390