Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1341712 - Error registering a host after the upgrade has completed
Summary: Error registering a host after the upgrade has completed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Sachin Ghai
URL:
Whiteboard:
Depends On:
Blocks: 1335807
TreeView+ depends on / blocked
 
Reported: 2016-06-01 14:51 UTC by Brad Buckingham
Modified: 2019-09-26 17:32 UTC (History)
2 users (show)

Fixed In Version: rubygem-katello-3.0.0.43-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:13:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
production.log during failed sub-man register (35.95 KB, text/plain)
2016-06-01 14:51 UTC, Brad Buckingham
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15260 0 Normal Closed Error registering a host after the upgrade has completed 2020-08-24 18:39:31 UTC

Description Brad Buckingham 2016-06-01 14:51:34 UTC
Created attachment 1163707 [details]
production.log during failed sub-man register

Description of problem:

If prior to a Satellite 6.2 upgrade, there is a host registered where the Host and Content Host are in different organizations (e.g. host not in org, and content host in one), the content host will be unregistered as part of the upgrade process.  When this occurs, after the upgrade is completed, the user would need to re-register the host with the Satellite for content and subscription capabilities.  Unfortunately, this is currently causing an error.

Note: this does not affect all registrations after upgrade, only those that met the scenario above.

Version-Release number of selected component (if applicable):
Satellite 6.2 Snap 13.1

How reproducible:
Always

Steps to Reproduce:
1. install Satellite 6.1
2. install Capsule 6.1
3. subscription-manager register the Capsule to the Satellite
4. ensure that the Host associated with the Capsule is not in an organization and the Content Host is
5. perform an upgrade of the Satellite 6.1 to 6.2
6. after the upgrade completes, attempt to register the Capsule back to the Satellite

Actual results:

[root@capsule61-rhel7 ~]# subscription-manager register --org="Default_Organization" --activationkey="key"
Task 5b28c9ed-f36d-44f5-aa85-5363363efc72: RestClient::ResourceNotFound: 404 Resource Not Found

Snippet from the logs:
2016-06-01 03:00:55 [app] [I] Started POST "/rhsm/consumers?owner=Default_Organization&activation_keys=key" for 192.168.121.198 at 2016-06-01 03:00:55 +0000
2016-06-01 03:00:55 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-06-01 03:00:55 [app] [I]   Parameters: {"facts"=>"[FILTERED]", "installedProducts"=>[{"productName"=>"Red Hat Enterprise Linux Server", "arch"=>"x86_64", "version"=>"7.2", "productId"=>"69"}, {"productName"=>"Red Hat Satellite Capsule", "arch"=>"x86_64", "version"=>"6.1", "productId"=>"269"}], "type"=>"system", "name"=>"capsule61-rhel7.example.com", "contentTags"=>["satellite-capsule", "satellite-capsule-6.1", "rhel-7", "rhel-7-server"], "owner"=>"Default_Organization", "activation_keys"=>"key"}
2016-06-01 03:01:04 [katello/pulp_rest] [I] RestClient.delete "https://sat61-rhel7.example.com/pulp/api/v2/consumers/ded17adf-5e57-4865-ac7c-773bd99d4e4d/", "Accept"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "accept"=>"application/json", "content_type"=>"application/json"
 | \n# => 404 NotFound | application/json 528 bytes
 | 
...
...

Expected results:

Registration completes successfully

Additional info:

Comment 1 Brad Buckingham 2016-06-01 14:54:03 UTC
Note: If an error occurs during the registration, the user can work around it by performing the following:

1. log in to the UI
2. go to Monitor -> Tasks
3. locate the failed registration task
4. go to the Dynflow console for that task
5. 'skip' the deletion of the pulp consumer and 'resume' the task
6. re-register the host using 'subscription-manager'

Comment 2 Brad Buckingham 2016-06-01 15:25:47 UTC
Created redmine issue http://projects.theforeman.org/issues/15260 from this bug

Comment 4 Sachin Ghai 2016-06-03 09:02:44 UTC
Reproduced with upgrade from sat6.1.9 -> sat6.2 GA snap14.1

~]# subscription-manager register --org Default_Organization --activationkey 'ak_rhel7'
Task bd3dc14e-3c7d-4c3d-af67-0439675140a9: RestClient::ResourceNotFound: 404 Resource Not Found


[I] Started POST "/rhsm/consumers?owner=Default_Organization&activation_keys=ak_rhel7" for 10.8.193.1 at 2016-06-03 04:51:27 -0400
2016-06-03 04:51:27 [app] [I] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2016-06-03 04:51:27 [app] [I]   Parameters: {"facts"=>"[FILTERED]", "installedProducts"=>[{"productName"=>"Red Hat Enterprise Linux Server", "arch"=>"x86_64", "version"=>"7.2", "productId"=>"69"}, {"productName"=>"Red Hat Satellite Capsule", "arch"=>"x86_64", "version"=>"6.1", "productId"=>"269"}], "type"=>"system", "name"=>"qe-capsule-rhel7.satqe.lab.eng.rdu2.redhat.com", "contentTags"=>["satellite-capsule", "satellite-capsule-6.1", "rhel-7", "rhel-7-server"], "owner"=>"Default_Organization", "activation_keys"=>"ak_rhel7"}
2016-06-03 04:51:33 [katello/pulp_rest] [I] RestClient.delete "https://qe-sat6-upgrade-rhel7.satqe.lab.eng.rdu2.redhat.com/pulp/api/v2/consumers/c1d5c956-b9c5-4088-914b-fd5e0e828c32/", "Accept"=>"*/*; q=0.5, application/xml", "Accept-Encoding"=>"gzip, deflate", "accept"=>"application/json", "content_type"=>"application/json"
 | \n# => 404 NotFound | application/json 528 bytes
 | 
2016-06-03 04:51:33 [foreman-tasks/action] [E] 404 Resource Not Found (RestClient::ResourceNotFound)

Comment 5 Sachin Ghai 2016-06-03 09:12:37 UTC
Note: given workaround works

Comment 6 Sachin Ghai 2016-06-10 08:08:55 UTC
Verified with upgrade from sat6.1.9 -> sat6.2 GA snap15.1 on rhel7. The
reported issue is fixed now. 

After successful upgrade of satellite, capsule got unregistered as host with same name was not in org but content-host with same name was in an org. So as per host unification, content-host got unregistered. So I re-registered the capsule:

~]# yum repolist
Loaded plugins: package_upload, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repolist: 0
[root@qe-capsule-rhel7 ~]# subscription-manager register --org Default_Organization --activationkey 'ak-rhel7'
Couldn't find activation key 'ak-rhel7'
[root@qe-capsule-rhel7 ~]# subscription-manager register --org Default_Organization --activationkey 'ak_rhel7'The system has been registered with ID: 6d7d9d1a-87de-4f80-ac41-06481e412aba 

Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

Product Name: Red Hat Satellite Capsule
Status:       Subscribed

Comment 7 Bryan Kearney 2016-07-27 11:13:58 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://access.redhat.com/errata/RHBA-2016:1501


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