Project

General

Profile

Bug #1341

Unknown Variables in partition tables

Added by Markus Falb over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

According #1044 partition tables are parsed by erb.

bla<%= @osver -%>blubb
blablubb

bla<%= @host.name -%>blubb

/usr/share/foreman/vendor/gems/safemode-1.0/lib/safemode/jail.rb:17:in `method_missing': undefined method 'name' for Safemode::Jail (NilClass)
/usr/share/foreman/app/controllers/unattended_controller.rb:163:in `load_template_vars'
/usr/share/foreman/lib/foreman/renderer.rb:7:in `render_safe'
/usr/share/foreman/lib/foreman/renderer.rb:45:in `pxe_render'
/usr/share/foreman/app/models/host.rb:225:in `diskLayout'
/usr/share/foreman/app/controllers/unattended_controller.rb:185:in `kickstart_attributes'
(eval):1:in `load_template_vars'
/usr/share/foreman/app/controllers/unattended_controller.rb:163:in `load_template_vars'

bla<% if "bla" == "bla" ->bla< end -%>blubb
blablablubb

It seems to me that partition table is parsed, but the Variables as listed in http://theforeman.org/projects/foreman/wiki/TemplateWriting are not available.


Related issues

Related to Foreman - Bug #21172: Unknown Variables in partition tables <%= @osver %>Closed2017-10-02

Associated revisions

Revision b99ef03f (diff)
Added by Ohad Levy over 7 years ago

fixes #1341 - tftp templates can now use @host as well.

History

#1 Updated by Markus Falb over 7 years ago

I figured out that the @host.XXX variables are accessible if i deactivate safe rendering, but I have to refer to it without the leading @host.

Instead of <%= @host.name -%> this is working: <%= name -%>
Confusing, but working.

#2 Updated by Ohad Levy over 7 years ago

  • Target version set to 1.0

#3 Updated by Ohad Levy over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

#4 Updated by Ivan Necas almost 2 years ago

  • Related to Bug #21172: Unknown Variables in partition tables <%= @osver %> added

Also available in: Atom PDF