ManageIQ/manageiq — pull request #395 by blomquisg (2014-08-14 17:03:20+00:00)
Title: Nullify the cluster_id on hosts when deleted

When Clusters are deleted, the ems_cluster_id should be nullified on residual
hosts.

As a performance concern, hosts are not automatically deleted when an
infrastructure provider is deleted. However, the clusters may be. In such
cases, the old ems_cluster_id will remain on the host record.

Then, if the same infrastructure provider is added back, and an ems_refresh is
initiated, the hosts attempt to resolve the ems_cluster_id (which points to
nothing now) and ends up with an object not found error from active record.

https://bugzilla.redhat.com/show_bug.cgi?id=1087476