This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2269386 - Error undefined method `repository_url' when tryinfg to use composed images for system deployments in Red Hat Satellite 6
Summary: Error undefined method `repository_url' when tryinfg to use composed images f...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.14.2
Hardware: All
OS: All
high
high
Target Milestone: Unspecified
Assignee: Ian Ballou
QA Contact: Gaurav Talreja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-13 15:15 UTC by Sayan Das
Modified: 2024-10-05 04:27 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2272114 2279316 (view as bug list)
Environment:
Last Closed: 2024-06-06 17:25:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 37268 0 High Closed Error undefined method `repository_url' when trying to use composed images for system deployments 2024-03-26 13:53:07 UTC
Red Hat Issue Tracker   SAT-23943 0 None Migrated None 2024-06-06 17:25:46 UTC

Description Sayan Das 2024-03-13 15:15:02 UTC
Description of problem:

While following https://access.redhat.com/documentation/en-us/red_hat_satellite/6.14/html-single/provisioning_hosts/index#Using_an_Image_Builder_Image_for_Provisioning_provisioning , After submitting the host for build with kickstart_liveimg parameter, The process is unable to fetch kickstart or render\preview the Kickstart template shipped with Red Hat Satellite 6.


Version-Release number of selected component (if applicable):

Satellite 6.14 [ perhaps some older versions are affected as well ]


How reproducible:

Always

Steps to Reproduce:
1. Create a system with kickstart_liveimg parameter added
2. Try to render\preview the kickstart template against that host 
3. Repeat Step 2 with both Safemode Rendering enabled and disabled

Actual results:

With Safemode enabled:

2024-03-13T20:38:49 [W|app|74498179] Error rendering the Kickstart default template
2024-03-13T20:38:49 [I|app|74498179] Backtrace for 'Error rendering the Kickstart default template' error (Safemode::SecurityError): Safemode doesn't allow to access 'repository_url' on #<Safemode::ScopeObject>
 74498179 | /usr/share/gems/gems/safemode-1.3.8/lib/safemode/scope.rb:39:in `method_missing'
 74498179 | Kickstart default:114:in `initialize'
 74498179 | /usr/share/gems/gems/safemode-1.3.8/lib/safemode.rb:52:in `eval'
 74498179 | /usr/share/gems/gems/safemode-1.3.8/lib/safemode.rb:52:in `eval'
 74498179 | /usr/share/foreman/app/services/foreman/renderer/safe_mode_renderer.rb:7:in `render'
 74498179 | /usr/share/foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render'
 74498179 | /usr/share/foreman/app/models/template.rb:172:in `render'
 74498179 | /usr/share/foreman/app/controllers/templates_controller.rb:131:in `safe_render'
 74498179 | /usr/share/foreman/app/controllers/templates_controller.rb:111:in `preview'
 74498179 | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 74498179 | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/base.rb:228:in `process_action'
 74498179 | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
 74498179 | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 74498179 | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 74498179 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 74498179 | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 74498179 | /usr/share/gems/gems/audited-5.3.2/lib/audited/sweeper.rb:16:in `around'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 74498179 | /usr/share/gems/gems/audited-5.3.2/lib/audited/sweeper.rb:16:in `around'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 74498179 | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:137:in `run_callbacks'


With Safemode disabled: 


2024-03-13T20:36:07 [W|app|0deac36e] Error rendering the Kickstart default template
2024-03-13T20:36:07 [I|app|0deac36e] Backtrace for 'Error rendering the Kickstart default template' error (NoMethodError): undefined method `repository_url' for #<Foreman::Renderer::Scope::Provisioning:0x0000557a6cde2a10>
 0deac36e | Did you mean?  register_url
 0deac36e | Kickstart default:38:in `get_binding'
 0deac36e | /usr/share/ruby/erb.rb:905:in `eval'
 0deac36e | /usr/share/ruby/erb.rb:905:in `result'
 0deac36e | /usr/share/foreman/app/services/foreman/renderer/unsafe_mode_renderer.rb:7:in `render'
 0deac36e | /usr/share/foreman/app/services/foreman/renderer/base_renderer.rb:18:in `render'
 0deac36e | /usr/share/foreman/app/services/foreman/renderer.rb:46:in `render'
 0deac36e | /usr/share/foreman/app/models/template.rb:172:in `render'
 0deac36e | /usr/share/foreman/app/controllers/templates_controller.rb:131:in `safe_render'
 0deac36e | /usr/share/foreman/app/controllers/templates_controller.rb:111:in `preview'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/base.rb:228:in `process_action'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/rendering.rb:30:in `process_action'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
 0deac36e | /usr/share/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 0deac36e | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 0deac36e | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 0deac36e | /usr/share/gems/gems/audited-5.3.2/lib/audited/sweeper.rb:16:in `around'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 0deac36e | /usr/share/gems/gems/audited-5.3.2/lib/audited/sweeper.rb:16:in `around'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
 0deac36e | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:137:in `run_callbacks'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:41:in `process_action'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/rescue.rb:22:in `process_action'
 0deac36e | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'



It seems foreman does not even know where the repository_url function exists or what to pick from. 



Expected results:

No such error and end-users would be able to deploy systems using the RH Image builder images and the documented procedure in "Chapter 8. Using a Red Hat Image Builder Image for Provisioning"


Additional info:

Comment 9 Ian Ballou 2024-03-14 19:15:13 UTC
Created redmine issue https://projects.theforeman.org/issues/37268 from this bug

Comment 10 Bryan Kearney 2024-03-15 16:03:42 UTC
Upstream bug assigned to iballou

Comment 11 Bryan Kearney 2024-03-15 16:03:45 UTC
Upstream bug assigned to iballou

Comment 12 Bryan Kearney 2024-03-26 16:03:47 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/37268 has been resolved.

Comment 16 Sayan Das 2024-05-14 16:18:12 UTC
Created the doc BZ https://bugzilla.redhat.com/show_bug.cgi?id=2280349

Comment 17 Eric Helms 2024-06-06 17:25:47 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.

Comment 18 Red Hat Bugzilla 2024-10-05 04:27:26 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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