-
Bug
-
Resolution: Done-Errata
-
Major
-
None
-
False
-
-
False
-
CLOSED
-
Release Notes
-
2,700
-
-
Bug Fix
-
Done
-
Rocket
-
-
-
Sprint 130
-
Important
-
Yes
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:
- external trackers
- links to
-
RHBA-2024:140284 Important: Satellite 6.16.0 release