Bug 1420626 - Content host registration with satellite raises error: Couldn't find Katello::System without an ID
Summary: Content host registration with satellite raises error: Couldn't find Katell...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Upgrades
Version: 6.2.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Sachin Ghai
URL:
Whiteboard:
: 1420747 (view as bug list)
Depends On:
Blocks: Sat6_Upgrades
TreeView+ depends on / blocked
 
Reported: 2017-02-09 06:20 UTC by Sachin Ghai
Modified: 2019-09-26 17:30 UTC (History)
7 users (show)

Fixed In Version: tfm-rubygem-katello-3.0.0.102-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-06 08:37:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
generated logs on registering content-host (47.08 KB, text/plain)
2017-02-09 06:30 UTC, Sachin Ghai
no flags Details
foreman-debug (2.82 MB, application/x-xz)
2017-02-09 06:38 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0447 0 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 13:23:41 UTC

Description Sachin Ghai 2017-02-09 06:20:46 UTC
Description of problem: Upgraded satellite from sat6.1.11 -> sat6.2.8 and later registered a content host w/ satellite and it got failed w/ error:

 ~]# subscription-manager register --org="Default_Organization" --activationkey=rhel7_capsule_ak --force
Task 6276055d-fd95-4af7-80c1-cf7429aac471: ActiveRecord::RecordNotFound: Couldn't find Katello::System without an ID

--

==> /var/log/foreman/production.log <==
2017-02-09 01:03:36 [foreman-tasks/action] [E] Couldn't find Katello::System without an ID (ActiveRecord::RecordNotFound)
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/finder_methods.rb:402:in `find_with_ids'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/relation/finder_methods.rb:68:in `find'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/querying.rb:3:in `find'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.101/app/lib/actions/katello/host/register.rb:70:in `finalize'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.3/lib/dynflow/action.rb:528:in `block (2 levels) in execute_finalize'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.3/lib/dynflow/middleware/stack.rb:26:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.3/lib/dynflow/middleware/stack.rb:26:in `pass'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.3/lib/dynflow/middleware.rb:17:in `pass'

--

Version-Release number of selected component (if applicable):
upgrade sat6.1.11 -> sat6.2.8

How reproducible:
always

Steps to Reproduce:
1. register a content-host w/ upgraded satellite
2.
3.

Actual results:
content-host registration failed 

Expected results:
registration should work.

Additional info:
this issue appears w/ both satellite on rhel6 and rhel7.

Comment 2 Sachin Ghai 2017-02-09 06:30:23 UTC
Created attachment 1248742 [details]
generated logs on registering content-host

Comment 3 Sachin Ghai 2017-02-09 06:38:57 UTC
Created attachment 1248744 [details]
foreman-debug

Comment 4 Sachin Ghai 2017-02-09 08:24:43 UTC
Please note that this issue appears when we register a content-host w/ upgraded (sat6.2.7 -> sat6.2.8 snap1) satellite.

Comment 5 Sachin Ghai 2017-02-09 08:26:32 UTC
(In reply to Sachin Ghai from comment #4)
> Please note that this issue appears when we register a content-host w/
> upgraded (sat6.2.7 -> sat6.2.8 snap1) satellite.

Just to clarify, this issue appears for both upgraded versions..

6.1.11 -> 6.2.8
6.2.7 -> 6.2.8

Comment 6 Roman Plevka 2017-02-10 16:07:56 UTC
the 'upgrade' part plays no role in this BZ, it also fails to register a CH on a freshly installed 6.2.8-1.0.
It has trouble with using an org-id+host name and explicitely requires ID.

Comment 7 Roman Plevka 2017-02-10 16:09:02 UTC
*** Bug 1420747 has been marked as a duplicate of this bug. ***

Comment 8 Sachin Ghai 2017-02-13 07:44:13 UTC
Verified sat6.2.8 snap2

Issue has been fixed. We can now register the content-host w/ satellite.

 ~]# subscription-manager register --org Default_Organization --activationkey clientak_rhel7
The system has been registered with ID: bfe9e638-ff13-4a06-8852-56db37cc9ecf 

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

Comment 10 errata-xmlrpc 2017-03-06 08:37:50 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-2017:0447


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