find the file:
/opt/rh/ruby193/root/usr/share/gems/gems/katello-2.0.0/lib/katello/tasks/clean_backend_objects.rake
###1. on line 13 change:
system.facts to
if system.uuid
::Katello::Resources::Candlepin::Consumer.get(system.uuid)
else
cp_fail = true
end
###2. also, at the top of the file, change:
pulp_fail = false
to
pulp_fail = true
###3. change:
system.del_candlepin_consumer unless cp_fail
to
::Katello::Resources::Candlepin::Consumer.destroy(system.uuid) if (!cp_fail && system.uuid)
###4. below this line:
system.system_activation_keys.destroy_all
add:
system.system_host_collections.destroy_all
so it looks like:
system.system_activation_keys.destroy_all
system.system_host_collections.destroy_all