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-184.108.40.206/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
Steps to Reproduce:
1. register a content-host w/ upgraded satellite
content-host registration failed
registration should work.
this issue appears w/ both satellite on rhel6 and rhel7.
Created attachment 1248742 [details]
generated logs on registering content-host
Created attachment 1248744 [details]
Please note that this issue appears when we register a content-host w/ upgraded (sat6.2.7 -> sat6.2.8 snap1) satellite.
(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
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.
*** Bug 1420747 has been marked as a duplicate of this bug. ***
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
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.