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 2041968

Summary: clarifications for environments options --list-enabled --list-disabled and --set
Product: Red Hat Enterprise Linux 9 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: redakkan, zpetrace
Target Milestone: rcKeywords: EasyFix, Triaged
Target Release: 9.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.29.25-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-17 15:58:31 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 John Sefler 2022-01-18 16:03:49 UTC
Description of problem:

To help clarify the use of multi-environments, I'd like to suggest some wording changes to the man page and command line help options. 


Version-Release number of selected component (if applicable):
[root@kvm-05-guest01 ~]# rpm -q subscription-manager
subscription-manager-1.29.23-1
[root@kvm-05-guest01 ~]# rpm -q --changelog subscription-manager | grep 1995032
- 1995032: Use multiple environments (wpoteat)
- 1995032: Use multiple environments (wpoteat)


How reproducible:


Steps to Reproduce:
[root@kvm-05-guest01 ~]# man -P cat subscription-manager | grep ENVIRONMENTS -A32
   ENVIRONMENTS OPTIONS
       The  environments  command  lists all of the environments that have been configured
       for an organization. This command is only used for organizations which have  a  lo‐
       cally-hosted  subscription or content service of some kind, like Subscription Asset
       Manager. The concept of environments -- and therefore this command -- have no mean‐
       ing  for  environments  which  use the Customer Portal Subscription Management ser‐
       vices.

       --username=USERNAME
              Gives the username for the account to use to connect to the organization ac‐
              count.

       --password=PASSWORD
              Gives the user account password.

       --token=TOKEN
              Token to use when authorizing against the server.

       --org=ORG
              Identifies the organization for which to list the configured environments.

       --list Lists all of the environments that have been configured for an organization.

       --list-enabled
              Lists all of the environments that have been enabled for this consumer.

       --list-disabled
              Lists  all of the environments that have been configured for an organization
              but not for this consumer.

       --set=SET
              Sets a list of one or more comma-separated environments for this consumer.


Actual results:
  above


Expected results:
  I suggest changing the --list-enabled description to...
       --list-enabled
              Lists the environments in the order that they have been enabled for this consumer.

  I suggest changing the --list-disabled description to...
       --list-disabled
              Lists all of the environments that have been configured for an organization
              but not enabled for this consumer.

  I suggest changing the --set description to...
       --set=SET
              Sets an ordered list of one or more comma-separated environments for this consumer.




[root@kvm-05-guest01 ~]# subscription-manager environments --help
usage: subscription-manager environments [OPTIONS]

Display the environments available for a user

optional arguments:
  -h, --help            show this help message and exit
  --proxy PROXY_URL     proxy URL in the form of hostname:port
  --proxyuser PROXY_USER
                        user for HTTP proxy with basic authentication
  --proxypassword PROXY_PASSWORD
                        password for HTTP proxy with basic authentication
  --noproxy NO_PROXY    host suffixes that should bypass HTTP proxy
  --username USERNAME   username to use when authorizing against the server
  --password PASSWORD   password to use when authorizing against the server
  --token TOKEN         token to use when authorizing against the server
  --org ORG_KEY         specify organization for environment list, using organization key
  --serverurl SERVER_URL
                        server URL in the form of https://hostname:port/prefix
  --insecure            do not check the entitlement server SSL certificate against available certificate authorities
  --set SET             set a comma-separated list of environments for this consumer
  --list                list all environments for the organization
  --list-enabled        list the environments enabled for this consumer
  --list-disabled       list the environments not enabled for this consumer

Actual results:
  above


Expected results:
  I suggest changing the --set description to...
  --set SET             set an ordered comma-separated list of environments for this consumer

  I suggest changing the --list-enabled description to...
  --list-enabled        list the environments enabled for this consumer in order

Comment 1 Zdenek Petracek 2022-01-24 15:38:54 UTC
SM Version:
[root@kvm-03-guest18 ~]# rpm -q subscription-manager
subscription-manager-1.29.23-1.git.9.a13e111.el9.x86_64


Pre-verification 1:
[root@kvm-03-guest18 ~]# man -P cat subscription-manager | grep ENVIRONMENTS -A32
   ENVIRONMENTS OPTIONS
       The environments command lists all of the environments that  have  been
       configured for an organization. This command is only used for organiza‐
       tions which have a locally-hosted subscription or  content  service  of
       some kind, like Subscription Asset Manager. The concept of environments
       -- and therefore this command -- have no meaning for environments which
       use the Customer Portal Subscription Management services.

       --username=USERNAME
              Gives  the username for the account to use to connect to the or‐
              ganization account.

       --password=PASSWORD
              Gives the user account password.

       --token=TOKEN
              Token to use when authorizing against the server.

       --org=ORG
              Identifies the organization for which to list the configured en‐
              vironments.

       --list Lists  all  of the environments that have been configured for an
              organization.

       --list-enabled
              Lists the environments in the order that they have been  enabled
              for this consumer.

       --list-disabled
              Lists  all  of the environments that have been configured for an
              organization but not enabled for this consumer.

wording changed as expected--> PASSED

Pre-verification 2:
[root@kvm-03-guest18 ~]# subscription-manager environments --help
usage: subscription-manager environments [OPTIONS]

Display the environments available for a user

optional arguments:
  -h, --help            show this help message and exit
  --proxy PROXY_URL     proxy URL in the form of hostname:port
  --proxyuser PROXY_USER
                        user for HTTP proxy with basic authentication
  --proxypassword PROXY_PASSWORD
                        password for HTTP proxy with basic authentication
  --noproxy NO_PROXY    host suffixes that should bypass HTTP proxy
  --username USERNAME   username to use when authorizing against the server
  --password PASSWORD   password to use when authorizing against the server
  --token TOKEN         token to use when authorizing against the server
  --org ORG_KEY         specify organization for environment list, using
                        organization key
  --serverurl SERVER_URL
                        server URL in the form of https://hostname:port/prefix
  --insecure            do not check the entitlement server SSL certificate
                        against available certificate authorities
  --set SET             set an ordered comma-separated list of environments
                        for this consumer
  --list                list all environments for the organization
  --list-enabled        list the environments enabled for this consumer in
                        order
  --list-disabled       list the environments not enabled for this consumer

wording changed --> PASSED

Comment 5 Zdenek Petracek 2022-02-23 12:01:30 UTC
[root@kvm-02-guest06 ~]# rpm -q subscription-manager
subscription-manager-1.29.26-1.el9.x86_64

Final-verification 1:
[root@kvm-02-guest06 ~]# man -P cat subscription-manager | grep ENVIRONMENTS -A32
   ENVIRONMENTS OPTIONS
       The environments command lists all of the environments that have been configured for an organization.  This
       command  is only used for organizations which have a locally-hosted subscription or content service of some
       kind, like Subscription Asset Manager. The concept of environments -- and therefore this command -- have no
       meaning for environments which use the Customer Portal Subscription Management services.
       .
       .
       --list Lists all of the environments that have been configured for an organization.

       --list-enabled
              Lists the environments in the order that they have been enabled for this consumer.

       --list-disabled
              Lists all of the environments that have been configured for an organization but not enabled for this
              consumer.

       --set=SET
              Sets an ordered list of one or more comma-separated environments for this consumer.

Wording changed --> PASSED

Final-verification 2:
[root@kvm-02-guest06 ~]# subscription-manager environments --help
usage: subscription-manager environments [OPTIONS]

Display the environments available for a user

optional arguments:
    .
    .
  --set SET             set an ordered comma-separated list of environments for this consumer
  --list-enabled        list the environments enabled for this consumer in order

Wording also changed --> PASSED

Comment 7 errata-xmlrpc 2022-05-17 15:58:31 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