Bug #6826
closedundefined method variable "subscription_manager_configuration_url"
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1104133
Description of problem:
When I try to create a EC2 guests using Sat6, I get this error in production.log and guest is not registered.
Prepare post installation script for ggg.test.example.com task failed with the following error: undefined method `subscription_manager_configuration_url' for #<Host::Managed:0x007f065c9f1d98>/opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/safemode-1.2.0/lib/safemode/scope.rb:37:in `method_missing'
<< the complete traceback is in the attachment >>
Version-Release number of selected component (if applicable):
Satellite-6.0.3-RHEL-6-20140528.4
How reproducible:
100%
Steps to Reproduce:
1. We have got Sat6 with EC2 compute resource.
2. We have got this line in our finish template
<%= snippets "subscription_manager_registration" %>
3. We can try create new host, but registration fails with the traceback in log.
Snippet "subscription_manager_registration" contains this row.
rpm -ivh <%= subscription_manager_configuration_url %>
One thing is interesting, When we open a detail of guest ("Hosts" > "All hosts" > our new guest > "Templates" > our finish template > "Review"), the expansion of the variable "subscription_manager_configuration_url" is correct
rpm -ivh http://sat.eu-west-1.compute.internal/pub/katello-ca-consumer-latest.noarch.rpm
When We replace the variable "subscription_manager_configuration_url" with link "http://sat.eu-west-1.compute.internal/pub/katello-ca-consumer-latest.noarch.rpm" in the snippet, the registration ends fine.
Actual results:
Traceback, system is not registered.
Expected results:
System is registered.
Additional info: