Bug 856236 - Misleading error message registering w/ activation key and passing environment
Misleading error message registering w/ activation key and passing environment
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity high
: rc
: 6.3
Assigned To: Bryan Kearney
Entitlement Bugs
: Triaged
Depends On:
Blocks: 771481
  Show dependency treegraph
 
Reported: 2012-09-11 10:19 EDT by Tom McKay
Modified: 2013-02-21 03:56 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 03:56:09 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom McKay 2012-09-11 10:19:41 EDT
Running subscription-manager-0.99.19-1.el6.x86_64.rpm and registering against katello with the following command fails with "Invalid credentials". Registering directly without an activation key works without a problem.

% subscription-manager register --activationkey=some-key --org=some-org --env=some-env
Invalid credentials

The katello server log:

Started GET "/katello/api/owners/zipco/environments?name=RED" for 10.11.230.167 at Tue Sep 11 10:16:36 -0400 2012
  Processing by Api::EnvironmentsController#index as JSON
  Parameters: {"name"=>"RED", "organization_id"=>"zipco"}
Setting locale: en
Completed   in 4ms
  Processing by FailedAuthenticationController#unauthenticated_api as JSON
  Parameters: {"name"=>"RED", "organization_id"=>"zipco"}
Request is unauthenticated_api for 10.11.230.167
Completed 401 Unauthorized in 6ms (Views: 3.1ms | ActiveRecord: 0.0ms)
[2012-09-11 10:16:54] ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv3 read client certificate A
	/usr/lib/ruby/1.8/openssl/ssl-internal.rb:166:in `accept'
[2012-09-11 10:16:54] ERROR OpenSSL::SSL::SSLError: SSL_accept SYSCALL returned=5 errno=0 state=SSLv3 read client certificate A
	/usr/lib/ruby/1.8/openssl/ssl-internal.rb:166:in `accept'
Comment 2 Tom McKay 2012-09-11 10:36:31 EDT
The real problem is that specifying an environment is not permitted with an activation key since that info is included. The CLI should not be making the api call at all.
Comment 4 Bryan Kearney 2012-10-08 15:07:43 EDT
fixed in master at 01d94d23d8cdc3f64745065a936f15c81d0c3d2a
Comment 7 spandey 2012-11-28 06:00:17 EST
Using following rpm 
subscription-manager-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-migration-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-firstboot-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-gui-1.8.0-1.git.3.006a990.el6.x86_64
subscription-manager-migration-data-1.12.2.6-1.git.0.171d4c3.el6.noarch



[root@localhost ~]# subscription-manager register --serverurl dhcp201-128.englab.pnq.redhat.com:443/katello/api --activationkey test_key --org ACME_Corporation --env test
Error: Activation keys do not allow environments to be specified.
Comment 8 John Sefler 2012-11-28 11:30:44 EST
Verifying Version...
[root@jsefler-6 ~]# rpm -q subscription-manager
subscription-manager-1.1.10-1.el6.x86_64

[root@jsefler-6 ~]# subscription-manager register --serverurl dhcp201-128.englab.pnq.redhat.com:443/katello/api --activationkey test_key --org ACME_Corporation --environment test
Error: Activation keys do not allow environments to be specified.
[root@jsefler-6 ~]# echo $?
255
[root@jsefler-6 ~]# subscription-manager register --serverurl dhcp201-128.englab.pnq.redhat.com:443/katello/api --activationkey test_key --org ACME_Corporation
The system has been registered with id: 9182a6d2-4721-4d88-9812-bbaa48a2a5fd 
[root@jsefler-6 ~]#

VERIFIED: subscription-manager now blocks you with an error message when specifying option --environment together with --org when registering with an --activationkey.
Comment 10 errata-xmlrpc 2013-02-21 03:56:09 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0350.html

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