Actions
Bug #14537
closedunable to register host with sub-man after puppet registration (bats failure)
Difficulty:
Triaged:
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'
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
Updated by Chris Duryee over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|8db03a71b353ec7633270a4131c865d606d00609.
Updated by The Foreman Bot over 8 years ago
- Pull request https://github.com/Katello/katello/pull/5951 added
Updated by Eric Helms over 8 years ago
- Translation missing: en.field_release set to 86
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.
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
Updated by Chris Duryee over 8 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|9365bba8702885ddde9029b02dff6bc177d1f656.
Actions