Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1104133 - undefined method variable "subscription_manager_configuration_url"
Summary: undefined method variable "subscription_manager_configuration_url"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Dustin Tsang
QA Contact: Martin Korbel
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-03 10:57 UTC by Martin Korbel
Modified: 2023-12-15 15:47 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:24:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
traceback (15.05 KB, text/plain)
2014-06-03 10:57 UTC, Martin Korbel
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 6826 0 Normal Closed undefined method variable "subscription_manager_configuration_url" 2020-02-27 12:22:21 UTC

Description Martin Korbel 2014-06-03 10:57:25 UTC
Created attachment 901757 [details]
traceback

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:

Comment 1 RHEL Program Management 2014-06-03 11:15:35 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Martin Korbel 2014-06-04 09:09:22 UTC
Next interesting thing is it, when We use "subscription_manager_registration" in user_data template (for cloud-init), We get this error in WebUI (when We try create new guest). It is difference between user_data (cloud-init) and finish (ssh) templates.

Render user data template for ggg.test.example.com task failed with the following error: undefined method `subscription_manager_configuration_url' for #<Host::Managed:0x0000000fc15ef8>

Comment 4 Dustin Tsang 2014-07-29 21:25:51 UTC
Created redmine issue http://projects.theforeman.org/issues/6826 from this bug

Comment 8 Daniel Lobato Garcia 2014-09-02 11:56:48 UTC
DEVELOPER VERIFIED: Registration worked successfully with this variable on user_data and finish templates.

Comment 10 Martin Korbel 2014-09-04 14:08:00 UTC
VERIFIED on Satellite-6.0.4-RHEL-6-20140829.0

Comment 11 Bryan Kearney 2014-09-11 12:24:10 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


Note You need to log in before you can comment on or make changes to this bug.