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 1065158 - [RFE] register with interactive credential prompting is missing the prompt for an environment
Summary: [RFE] register with interactive credential prompting is missing the prompt fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 7.1
Assignee: Bryan Kearney
QA Contact: John Sefler
URL:
Whiteboard:
Depends On: 1170661
Blocks: rhsm-rhel71
TreeView+ depends on / blocked
 
Reported: 2014-02-14 04:24 UTC by John Sefler
Modified: 2015-03-05 13:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:14:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0502 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2015-03-05 16:20:39 UTC

Description John Sefler 2014-02-14 04:24:27 UTC
Description of problem:
When registering from the command line to an entitlement server that supports environments, interactive prompts for username/password/org work as expected but then no prompt is given for the environment.

Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 1.4.15-1.el6-Katello
subscription-manager: 1.10.14-1.el7
python-rhsm: 1.10.12-1.el7


Steps to Reproduce:
[root@jsefler-7 ~]# subscription-manager register --serverurl=https://katellosach.usersys.redhat.com:443/katello/api
Username: admin
Password: 
Organization: redhat
Organization redhat has more than one environment. Please specify target environment for system registration.
[root@jsefler-7 ~]# 


Actual results:
above

Expected results:
Expected to be prompted for an "Environment: ".

Comment 1 Bryan Kearney 2014-03-19 20:52:19 UTC
Moving bugs from 7.0 to 7.1

Comment 3 Carter Kozak 2014-07-11 19:14:53 UTC
commit 69c4921f4fd9915e19317af44c4bf72cc5bf72e1
Author: Carter Kozak <ckozak>
Date:   Wed Jul 9 11:04:10 2014 -0400

    1065158: Prompt for environment on registration when necessary
    
    Behavior when an environment is passed via an argument is
    unchanegd, as well as behavior when environments are not
    supported by the server.
    If an owner has zero environments, the user will not be prompted
    and a null value will be passed.
    If the owner has a single environment, that will be used
    by default

Comment 4 Bryan Kearney 2014-07-30 19:24:04 UTC
Acking 7.1

Comment 7 John Sefler 2014-12-04 15:12:01 UTC
Verification of this bug is blocked by bug 1170661

Comment 8 John Sefler 2015-01-06 19:54:22 UTC
Verifying version...
[root@jsefler-os7 /]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 1.5.0-30.el6sat-Katello
subscription management rules: 5.11
subscription-manager: 1.13.12-1.el7
python-rhsm: 1.13.8-1.el7


After deploying a Satellite 6.0.6 server, and then...
Created a TestOrg1, and within it...
Created new Content > Lifecycle Environment path Library/TestEnv1 with a label
Created new Content > Lifecycle Environment path Library/TestEnv2 with a label
Created new Content > Content View TestView1 with a label
Created new Content > Content View TestView2 with a label
Published TestView1 and promoted it to Library > TestEnv1
Published TestView2 and promoted it to Library > TestEnv2

[root@jsefler-os7 /]# subscription-manager environments --username=admin --org=TestOrg1
Password: 
+-------------------------------------------+
          Environments
+-------------------------------------------+
Name:        TestEnv2-Label/TestView2-Label
Description: 

Name:        Library/TestView2-Label
Description: 

Name:        TestEnv1-Label/TestView1-Label
Description: 

Name:        Library/TestView1-Label
Description: 

Name:        Library
Description: 

[root@jsefler-os7 /]# 
[root@jsefler-os7 /]# subscription-manager register --username=admin --org=TestOrg1
Password: 
Environment: TestEnv1-Label/TestView1-Label   <==== INTERACTIVE PROMPT
The system has been registered with ID: e8f35d6c-b474-4a3d-b286-4f75cce7069b 
[root@jsefler-os7 /]# subscription-manager identity
system identity: e8f35d6c-b474-4a3d-b286-4f75cce7069b
name: jsefler-os7.usersys.redhat.com
org name: TestOrg1
org ID: TestOrg1
environment name: TestEnv1-Label/TestView1-Label
[root@jsefler-os7 /]# 
[root@jsefler-os7 /]# subscription-manager unregister 
System has been unregistered.
[root@jsefler-os7 /]# 
[root@jsefler-os7 /]# subscription-manager register --username=admin --org=TestOrg1
Password: 
Environment: TestEnv2-Label/TestView2-Label   <==== INTERACTIVE PROMPT
The system has been registered with ID: 1b3a9a67-52c8-4613-ab88-c8e389883533 
[root@jsefler-os7 /]# subscription-manager identity
system identity: 1b3a9a67-52c8-4613-ab88-c8e389883533
name: jsefler-os7.usersys.redhat.com
org name: TestOrg1
org ID: TestOrg1
environment name: TestEnv2-Label/TestView2-Label
[root@jsefler-os7 /]# 
[root@jsefler-os7 /]# subscription-manager unregister 
System has been unregistered.
[root@jsefler-os7 /]# 
[root@jsefler-os7 /]# subscription-manager register --username=admin --org=TestOrg1
Password: 
Environment: BadEnv                           <==== INTERACTIVE PROMPT
No such environment: BadEnv
[root@jsefler-os7 /]# 


VERIFIED: When there are multiple environments in Satellite, subscription-manager will interactively prompt the user to type an environment during registration.

Comment 10 errata-xmlrpc 2015-03-05 13:14:49 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, 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://rhn.redhat.com/errata/RHBA-2015-0502.html


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