Project

General

Profile

Bug #2110

Safemode broken between RC1->RC4 Upgrade

Added by Josh Baird over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
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.

Associated revisions

Revision 7dfe4b12 (diff)
Added by Dominic Cleal over 6 years ago

fixes #2110 - bump safemode to support !=

Revision 1628f795 (diff)
Added by Dominic Cleal over 6 years ago

fixes #2110 - bump safemode to support !=

History

#1 Updated by Dmitri Dolguikh over 6 years ago

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

#2 Updated by Dominic Cleal over 6 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

#3 Updated by Ohad Levy over 6 years ago

  • Target version set to 1.2.0

#4 Updated by Dominic Cleal over 6 years ago

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

Also available in: Atom PDF