Bug 818887 - Unable to unregister a system via SAM GUI
Unable to unregister a system via SAM GUI
Status: CLOSED WORKSFORME
Product: Subscription Asset Manager
Classification: Red Hat
Component: candlepin (Show other bugs)
1.0.0
Unspecified Linux
unspecified Severity medium
: rc
: ---
Assigned To: Jordan OMara
SAM QE List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-04 05:41 EDT by Ryoichiro Tsuruno
Modified: 2015-08-02 19:40 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-29 09:41:48 EDT
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 Ryoichiro Tsuruno 2012-05-04 05:41:58 EDT
Description of problem: I have successfully registered a virtual system via SAM GUI once.  I deleted this system from Customer Portal > Subscription tab > Consumer.  Now I am unable to unregister the system via SAM GUI.  The error message is:

Consumer c9f66bfxxxxxxxxx has been deleted
Please see /var/log/rhsm/rhsm.log for details.

/var/log/rhsm/rhsm.log says:
2012-05-04 17:09:16,222 [INFO]  @connection.py:350 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-05-04 17:09:16,224 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-05-04 17:09:16,225 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-05-04 17:09:16,227 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-05-04 17:09:16,230 [DEBUG]  @connection.py:209 - Making request: GET /subscription/
2012-05-04 17:09:17,640 [DEBUG]  @connection.py:218 - Response status: 200
2012-05-04 17:09:17,643 [DEBUG]  @connection.py:379 - Server supports the following resources:
2012-05-04 17:09:17,644 [DEBUG]  @connection.py:380 - {'owners': '/owners', 'jobs': '/jobs', 'users': '/users', 'consumers': '/consumers', 'subscriptions': '/subscriptions', 'pools': '/pools', 'products': '/products', 'entitlements': '/entitlements'}
2012-05-04 17:09:17,645 [INFO]  @connection.py:362 - Connection Established: host: subscription.rhn.redhat.com, port: 443, handler: /subscription
2012-05-04 17:09:17,655 [DEBUG]  @connection.py:188 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-05-04 17:09:17,656 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-05-04 17:09:17,658 [DEBUG]  @connection.py:171 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-05-04 17:09:17,660 [DEBUG]  @connection.py:209 - Making request: GET /subscription/consumers/c9f66b2f-50c3-4bfc-9924-0d669242bfa5/owner
2012-05-04 17:09:19,233 [DEBUG]  @connection.py:218 - Response status: 410
2012-05-04 17:09:19,234 [ERROR]  @managercli.py:401 - Consumer c9f66b2f-50c3-4bfc-9924-0d669242bfa5 has been deleted
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 382, in _do_command
    owner = self.cp.getOwner(consumerid)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 481, in getOwner
    return self.conn.request_get(method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 252, in request_get
    return self._request("GET", method)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 219, in _request
    self.validateResponse(result)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 239, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: Consumer c9f66b2f-50c3-4bfc-9924-0d669242bfa5 has been deleted
2012-05-04 17:09:19,240 [ERROR]  @managercli.py:402 - Error: Unable to generate a new identity for the system: Consumer c9f66b2f-50c3-4bfc-9924-0d669242bfa5 has been deleted

I have resolved the issue by running "subscription-manager clean" command in console.  However, this was not in the documentation.  "man subscription-manager" was the only way to access this information.

Version-Release number of selected component (if applicable):


How reproducible:
Every time you delete the system through Customer Portal.

Steps to Reproduce:
1. Register a system using SAM GUI
2. Delete this system through Customer Portal > Subscription > Consumers
3. Press "Unregister" button on SAM GUI
  
Actual results:
Cannot unregister the system.

Expected results:
Either "Unregister" button cleans the local information or document "subscription-manager clean" command in Installation document.

Additional info:
Comment 2 RHEL Product and Program Management 2012-05-04 05:54:54 EDT
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Subscription Asset Manager (SAM). Unfortunately,
we are unable to address this request. Because we are in the final stages
of development in the current release, only significant, release-blocking
issues involving serious regressions and data corruption can be considered.

If you believe this issue meets the release blocking criteria as defined and
communicated to you by your Red Hat Support representative, please ask
your representative to file this issue as a blocker for the current release.
Otherwise, ask that it be evaluated for inclusion in the next release of SAM.
Comment 3 RHEL Product and Program Management 2012-05-04 06:14:39 EDT
Thank you for your bug report. This issue was evaluated for inclusion
in the current release of Subscription Asset Manager (SAM). Unfortunately,
we are unable to address this request. Because we are in the final stages
of development in the current release, only significant, release-blocking
issues involving serious regressions and data corruption can be considered.

If you believe this issue meets the release blocking criteria as defined and
communicated to you by your Red Hat Support representative, please ask
your representative to file this issue as a blocker for the current release.
Otherwise, ask that it be evaluated for inclusion in the next release of SAM.
Comment 5 Ryoichiro Tsuruno 2012-05-07 22:59:25 EDT
Here is my rhsm.conf file.  I am registering against hosted SAM (if that's a correct term).  Another strange thing is that when I launch SAM GUI, it reports that the system is registered to hosted RHN even though I have it registered against hosted SAM.


[root@rhel6-1 ~]# cat /etc/rhsm/rhsm.conf
# Red Hat Subscription Manager Configuration File:

# Unified Entitlement Platform Configuration
[server]
# Server hostname:
hostname = subscription.rhn.redhat.com

# Server prefix:
prefix = /subscription

# Server port:
port = 443

# Set to 1 to disable certificate validation:
insecure = 0

# Set the depth of certs which should be checked
# when validating a certificate
ssl_verify_depth = 3

# Server CA certificate location:
ca_cert_dir = /etc/rhsm/ca/

# an http proxy server to use
proxy_hostname =

# port for http proxy server
proxy_port = 

# user name for authenticating to an http proxy, if needed
proxy_user =

# password for basic http proxy auth, if needed
proxy_password =

[rhsm]
# Content base URL:
baseurl= https://cdn.redhat.com

# Default CA cert to use when generating yum repo configs:
repo_ca_cert = %(ca_cert_dir)sredhat-uep.pem

# Where the certificates should be stored
productCertDir = /etc/pki/product
entitlementCertDir = /etc/pki/entitlement
consumerCertDir = /etc/pki/consumer

[rhsmcertd]
# Frequency of certificate refresh (in minutes):
certFrequency = 240
# Frequency of autoheal check (1440 min = 1 day):
healFrequency = 1440
Comment 6 Jordan OMara 2012-05-09 15:12:01 EDT
I wrote a github gist for connecting your local rhsm to SAM. Can you try these settings and try again? (substitute /headpin for your installation, presumably /sam)

https://gist.github.com/2645015
Comment 7 Tom McKay 2012-05-18 11:45:23 EDT
Is this still an issue? Is there any more help that is required?
Thanks!
Tom
Comment 8 Tom McKay 2012-05-29 09:41:48 EDT
Closing as working

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