Project

General

Profile

Actions

Bug #14537

closed

unable to register host with sub-man after puppet registration (bats failure)

Added by Chris Duryee over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
Fixed in Releases:
Found in Releases:

Description

If a host is registered via puppet, it is unable to then register with subscription manager

stack:

2016-04-07 14:22:50 [katello/cp_proxy] [E] ActiveRecord::AssociationTypeMismatch: Taxonomy(#66886280) expected, got NilClass(#19624500)
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/association.rb:216:in `raise_on_type_mismatch!'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/has_many_through_association.rb:32:in `block in concat'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/has_many_through_association.rb:31:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/has_many_through_association.rb:31:in `concat'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/associations/collection_proxy.rb:972:in `<<'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/app/lib/actions/katello/host/register.rb:69:in `connect_to_smart_proxy'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.1.0/app/lib/actions/katello/host/register.rb:32:in `block in plan'
Actions #1

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5946 added
Actions #2

Updated by Chris Duryee over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #3

Updated by The Foreman Bot over 8 years ago

  • Pull request https://github.com/Katello/katello/pull/5951 added
Actions #4

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release set to 86
Actions #5

Updated by Chris Duryee over 8 years ago

  • Status changed from Closed to New
  • Assignee deleted (Chris Duryee)

After discussion with Justin and Stephen, the most correct way to fix this is to update https://github.com/Katello/katello/blob/master/app/lib/actions/katello/host/register.rb#L9-L12 to call host.save immediately before unregistering, so the org doesn't get lost. The other PR can be undone as part of the fix, since host.organization can be relied upon again.

Actions #6

Updated by The Foreman Bot over 8 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/5966 added
Actions #7

Updated by Chris Duryee over 8 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF