waveclaw / puppet-subscription_manager

Handle Client Registration to RedHat Satellite 6 or Katello
https://rhn.redhat.com
Other
6 stars 34 forks source link

Missing name property makes prefetch fail for rhsm_pool resource #100

Open imp- opened 4 years ago

imp- commented 4 years ago

I have been trying to automatically purge all rhsm_pool resources that are not present in the catalog, but have hit this error in doing so:

Failed to generate additional resources using 'generate': No resource and no name in property hash in subscription_manager instance

It appears the 'name' property of the rhsm_pool resource was removed in commit b65cae3 and the id property is marked as namevar. This is fine, except when we have to deal with prefetching resources like in this scenario.

I did some research and discovered this is a known issue, see PUP-7935. We can validate this in the puppet source code and see that the 'name' property is hardcoded.

The only workaround is to re-introduce the 'name' property.

I will provide a pull request shortly.