Created attachment 1163195 [details] foreman production log Description of problem: When trying to do a RHEV deployment, content sync as usual but fail at the end with the error : Couldn't find Puppetclass with 'id'=access_insights_client (ActiveRecord::RecordNotFound) Version-Release number of selected component (if applicable): QCI-1.2-RHEL-7-20160527.t.0-QCI-x86_64-dvd1 ISO file. How reproducible: Always. I tried with my own Satellite application which contains "Employee SKU" subscriptions and I also tried with the rhci-test login with "QCI test" Satellite application. Both result in the same error. Steps to Reproduce: 1. Install QCI with the ISO. 2. Start a new deployment. 3. Wait for content to finish syncing and see the error. Actual results: Fail with the error and stop the deployment. Expected results: Work and continue the deployment. Additional info:
In /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/configure_host_groups.rb, the access_insights_client puppet class can't be found with the find() method: # this host group is the deployment group # add access insights class, will get inherited by all machine nodes if deployment.enable_access_insights # Puppetclass names are unique, there is only one access insights # puppet class regardless of how many environments or orgs there are insights_class = Puppetclass.find("access_insights_client") hostgroup_params[:puppetclass_ids] = [insights_class.id] end If I change it to look up by name with where(), then the task completes successfully: # diff -pruN /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/configure_host_groups.rb.bak /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/configure_host_groups.rb --- /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/configure_host_groups.rb.bak 2016-06-02 15:16:02.883152810 -0400 +++ /opt/theforeman/tfm/root/usr/share/gems/gems/fusor_server-1.0.0/app/lib/actions/fusor/configure_host_groups.rb 2016-06-02 15:31:35.315715814 -0400 @@ -113,8 +113,9 @@ module Actions if deployment.enable_access_insights # Puppetclass names are unique, there is only one access insights # puppet class regardless of how many environments or orgs there are - insights_class = Puppetclass.find("access_insights_client") - hostgroup_params[:puppetclass_ids] = [insights_class.id] + # insights_class = Puppetclass.find("access_insights_client") + insights_class = Puppetclass.where(:name => 'access_insights_client').try(:first) + hostgroup_params[:puppetclass_ids] = [insights_class.try(:id)] end default_capsule_id = ::Katello::CapsuleContent.default_capsule.try(:capsule).try(:id)
I can confirm that the patch proposed by Tasos fix the problem and the deployment complete successfully.
https://github.com/fusor/fusor/pull/940
Addressed in ISO Set: QCI-1.2-RHEL-7-20160623.t.0-QCI-x86_64-dvd1.iso QCIOOO-8.0-RHEL-7-20160623.t.0-QCIOOO-x86_64-dvd1.iso
Verified on QCI-1.2-RHEL-7-20160627.t.0.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2016:1862