Bug #15725
closed
virt-who checkin should use default org view and should not overwrite existing registration
Added by Justin Sherrill over 8 years ago.
Updated almost 7 years ago.
Description
Right now virt-who checkin's still register the host to a specific content view and lifecycle environment, but the create host has no content facet. This is incorrect and should just use the default org view and library
Related issues
1 (1 open — 0 closed)
to correct this, simply use:
foreman-rake console
User.current = User.first
Katello::Hypervisor.all.each do |hypervisor|
org = hypervisor.environment.organization
hypervisor.content_view = org.default_content_view
hypervisor.environment = org.library
hypervisor.save!
candlepin_environment_id = org.default_content_view.content_view_environments.first.cp_id
::Katello::Resources::Candlepin::Consumer.update(hypervisor.uuid, {'environment' => {'id' => candlepin_environment_id}})
end
- Bugzilla link set to 1357878
- Category set to 78
- Status changed from New to Assigned
- Assignee set to Justin Sherrill
- Translation missing: en.field_release set to 162
- Difficulty set to medium
- Subject changed from virt-who checkin should use default org view unless the hypervisor is registered to virt-who checkin should use default org view and should not overwrite existing registration
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/6235 added
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF
Fixes #15725 - fixing cv/env and register overwritting (#6235)
This fixes one minor issue and one major issue:
with the passed in Environment and Content view. This is
because no Content facet exists. In fact candlepin seems to
completely ignore this parameter and does not save environment
for hypervisors
the virt-who host is already registered, the registration will be
overwritten/lost and the host's registration will be useless