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-manager | Assignee: | Pino Toscano <ptoscano> |
| Status: | CLOSED ERRATA | QA Contact: | Red Hat subscription-manager QE Team <rhsm-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 8.3 | CC: | jsefler, redakkan |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | 8.5 | Flags: | 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: | |||
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.
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 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 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!!
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 |
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: