Project

General

Profile

Actions

Bug #2110

closed

Safemode broken between RC1->RC4 Upgrade

Added by Josh Baird almost 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Safemode appears to be broken after my upgrade from RC1 to RC4. RC4 was unable to render my provisioning template with the following error:

There was an error rendering the FC-RHEL6-Kickstart template: compile error
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:55: syntax error, unexpected tNEQ
...jail.concat((@osver.to_jail.!=(3) and if @osver.to_jail.!=(4...
                              ^
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:55: syntax error, unexpected tNEQ
...!=(3) and if @osver.to_jail.!=(4) then
                              ^
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:55: syntax error, unexpected kTHEN, expecting ')'
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:57: syntax error, unexpected kELSE, expecting ')'
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:59: syntax error, unexpected kEND, expecting ')'
end).to_jail.to_s)
   ^
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:60: syntax error, unexpected tIDENTIFIER, expecting ')'
_erbout.to_jail.concat("\nbootloader ...
       ^
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:68: syntax error, unexpected tNEQ
_erbout.to_jail.concat((if @osver.to_jail.!=(3) then
                                            ^
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:68: syntax error, unexpected kTHEN, expecting ')'
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:70: syntax error, unexpected kEND, expecting ')'
end).to_jail.to_s)
   ^
/usr/lib/ruby/gems/1.8/gems/safemode-1.1.0/lib/safemode.rb:71: syntax error, unexpected tIDENTIFIER, expecting ')'
_erbout.to_jail.concat("network --bootproto ")
       ^

Disabling Safrmode in Settings->Provisioning allowed the template to render properly.

Actions #1

Updated by Anonymous over 11 years ago

Would it be possible to see the template/snippet of the template that triggered the exception?

Actions #2

Updated by Dominic Cleal over 11 years ago

  • Category set to Templates
  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal

Thanks for the safemode fix Dmitri!

https://github.com/theforeman/foreman/pull/407

Actions #3

Updated by Ohad Levy over 11 years ago

  • Target version set to 1.2.0
Actions #4

Updated by Dominic Cleal over 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF