error "Katello::Resources::Candlepin::Consumer: 410 Gone
{"displayMessage":"Unit 370f8333-fd19-4c0b-9408-dff6d80ce28d has been deleted"}
foreman-rake console
Katello::System.find_by(:uuid => '370f8333-fd19-4c0b-9408-dff6d80ce28d').try(:destroy!)
host = Katello::Host::SubscriptionFacet.find_by(:uuid => '370f8333-fd19-4c0b-9408-dff6d80ce28d').try(:host)
host.subscription_facet.try(:destroy! ) if host
host.content_facet.try(:destroy!) if host
For cases where the uuid is nil, such as:
Runtime Error RESTEASY001185: Could not find resource for relative : /consumers//compliance of full path:
https://localhost:8443/candlepin/consumers//compliance at org.jboss.resteasy.core.registry.PathParamSegment.matchPattern:209
host = Host.find_by(:name => "foobar.example.com")
host.subscription_facet.try(:destroy! ) if host
host.content_facet.try(:destroy!) if host
host.content_host.try(:destroy) if host