Bug 1994056

Summary: Subscription manager should accept multiple content views (Environment)
Product: Red Hat Enterprise Linux 8 Reporter: Rehana <redakkan>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: high Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: high    
Version: 8.6CC: jsefler, qianzhan, wpoteat
Target Milestone: betaKeywords: Triaged
Target Release: 8.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.28.27-1.el8 Doc Type: Enhancement
Doc Text:
.`subscription-manager` now supports multi-environment operations With this update, administrators are now able to assign a list of environments to a system, ordered from highest to lowest priority, at registration time and change that list as necessary. This provides access to content from all assigned environments. Content available from more than one assigned environment is provided from the environment with the highest priority. This update changes the `environment` subcommand to `environments` and supports the following new options: * `--set`: Sets a comma-separated list of environments for the consumer from highest to lowest priority * `--list`: Displays an ordered list of all environments that belong to the organization * `--list-enabled`: Displays an ordered list of environments currently assigned to the system * `--list-disabled`: Displays a list of environments that belong to the organization but are not assigned to the system
Story Points: ---
Clone Of:
: 1995032 (view as bug list) Environment:
Last Closed: 2022-05-10 15:22:56 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:
Bug Depends On:    
Bug Blocks: 1995032    

Comment 10 John Sefler 2022-02-22 18:20:51 UTC
Verifying subscription-manager-1.28.28-1.el8.x86_64 in RHEL compose RHEL-8.6.0-20220220.3...

**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
      Beaker Test information:
                         HOSTNAME=kvm-05-guest03.hv2.lab.eng.bos.redhat.com
                            JOBID=6330390
                         RECIPEID=11506605
                    RESULT_SERVER=
                           DISTRO=RHEL-8.6.0-20220220.3
                     ARCHITECTURE=x86_64
**  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **  **
[root@kvm-05-guest03 ~]# 
[root@kvm-05-guest03 ~]# rpm -q subscription-manager
subscription-manager-1.28.28-1.el8.x86_64
[root@kvm-05-guest03 ~]# rpm -q --changelog subscription-manager | grep 1994056
- 1994056: Multiple environment capability (wpoteat)
[root@kvm-05-guest03 ~]# 

Note: This new environments capability is visible in subscription-manager as a new "--environments" option in the register module (replacing the former "--environment" option)...

[root@kvm-05-guest03 ~]# subscription-manager register --help | grep "environment"
  --environments ENVIRONMENTS                                                 <=== NEW
                        register with a specific environment (single value) or
                        multiple environments (a comma-separated list) in the
                        environments is controlled by the entitlement server

Note: New options have also been added to the existing environments module...

[root@kvm-05-guest03 ~]# subscription-manager environments --help | grep environments -A1
usage: subscription-manager environments [OPTIONS]

Display the environments available for a user

--
  --set SET             set an ordered comma-separated list of environments  <=== NEW
                        for this consumer
  --list                list all environments for the organization           <=== NEW
  --list-enabled        list the environments enabled for this consumer in   <=== NEW
                        order
  --list-disabled       list the environments not enabled for this consumer  <=== NEW

Note: This new capability is dependent on the capabilities of the entitlement server which is not provided by the default hosted subscription.rhsm.redhat.com.

[root@kvm-05-guest03 ~]# subscription-manager register --environments="foo"
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: rhelentqe
Password: 
Error: Server does not support environments.
[root@kvm-05-guest03 ~]# 
[root@kvm-05-guest03 ~]# subscription-manager register
Registering to: subscription.rhsm.redhat.com:443/subscription
Username: rhelentqe
Password: 
The system has been registered with ID: 940ebb27-3945-40ab-9131-bc3dfbba44b0
The registered system name is: kvm-05-guest03.hv2.lab.eng.bos.redhat.com
[root@kvm-05-guest03 ~]# 
[root@kvm-05-guest03 ~]# subscription-manager environments --set="foo"
Error: Server does not support environments.
[root@kvm-05-guest03 ~]# 
[root@kvm-05-guest03 ~]# subscription-manager environments --list
Error: Server does not support environments.
[root@kvm-05-guest03 ~]# 
[root@kvm-05-guest03 ~]# subscription-manager environments --list-enabled
Error: Server does not support environments.
[root@kvm-05-guest03 ~]# 
[root@kvm-05-guest03 ~]# subscription-manager environments --list-disabled
Error: Server does not support environments.
[root@kvm-05-guest03 ~]# 


VERIFIED: For the sake of ON_QA verification, the RHEL composes targeting RHEL8.6 now include subscription-manager-1.28.28-1.el8 which includes support for multi-environment capable entitlement servers such as planned in the next release of Satellite.  More detailed testing comparable to comment 4 comment 5 and comment 6 can occur against Satellite once it is updated with a "multi_environment" capable Candlepin server.

Comment 12 Jacob Taylor Valdez 2022-03-30 07:53:52 UTC
doc text has been acked by SME's and peer-review, setting rdt to +

Comment 14 errata-xmlrpc 2022-05-10 15:22:56 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-2022:2047