Bug #5708

iPXE template fails with undefined method 'nil?' for Safemode::Jail (Token)"

Added by Dane Butler over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Dmitri Dolguikh
Category:Templates
Target version:Sprint 24
Difficulty:easy Bugzilla link:1107694
Found in release:1.5.0 Pull request:
Story points-
Velocity based estimate-
Release1.5.1Release relationshipAuto

Description

Error code 1d0c61: http://ipxe.org/err/1d0c61
Affects Foreman 1.5.0, always reproducable on my end.

ipxe.png - Error message (12.1 KB) Preview Dane Butler, 05/14/2014 12:45 AM

Ipxe

Associated revisions

Revision 3ff2bba4
Added by Dmitri Dolguikh over 3 years ago

fixes #5708: #nil? is now an allowed method inside of Host and Token jails

Revision 11036a8d
Added by Dmitri Dolguikh over 3 years ago

fixes #5708: #nil? is now an allowed method inside of Host and Token jails

(cherry picked from commit 3ff2bba4ef3987b131b49912fdd92bbf67f9c1ba)

History

#1 Updated by Dominic Cleal over 3 years ago

  • Status changed from New to Need more information

Can you check /var/log/foreman/production.log when you provision? I'm interested to see if any requests reach Foreman, and if they complete successfully.

#2 Updated by Dane Butler over 3 years ago

It does hit but doesn't explain much:

Started GET "/unattended/iPXE?token=4890cccd-e5c9-4900-b0fb-dbdc4831ea13&mac=00%3A50%3A56%3Ab9%3A71%3Aae" for 10.145.192.101 at 2014-05-14 22:32:11 +0000
Processing by UnattendedController#iPXE as HTML
Parameters: {"token"=>"4890cccd-e5c9-4900-b0fb-dbdc4831ea13", "mac"=>"00:50:56:b9:71:ae"}
Found ipa-evl-01.airservices.gov.au
Rendered inline template (15.0ms)
Rendered text template (0.0ms)
Completed 500 Internal Server Error in 34ms (Views: 0.5ms | ActiveRecord: 0.5ms)

#3 Updated by Dominic Cleal over 3 years ago

The 500 error is a good indication. Try viewing the host page, then under the Templates tab preview the iPXE template and see what error is reported.

#4 Updated by Dane Butler over 3 years ago

See it:

"There was an error rendering the Kickstart default iPXE template: undefined method 'nil?' for Safemode::Jail (Token)"

Changing "safemode_render" has resolved this issue. I remember 1.4.x actually prevented you from downloading the iso until this change was made. Suggest bringing this failsafe back.

#5 Updated by Dominic Cleal over 3 years ago

  • Project changed from Boot disk to Foreman
  • Subject changed from VM won't provision with ipxe: Error 1d0c61 to iPXE template fails with undefined method 'nil?' for Safemode::Jail (Token)"
  • Status changed from Need more information to New
  • Assigned To deleted (Dominic Cleal)
  • Release set to 1.5.1
  • Found in release set to 1.5.0

The hope was that all of the safemode issues had been resolved, sorry!

I think we can either add .nil? to the permitted methods on Token, or update the template to always assume there's a token.

#6 Updated by Dominic Cleal over 3 years ago

  • Category set to Templates

#7 Updated by Dominic Cleal over 3 years ago

  • Target version set to Sprint 24

#8 Updated by Dmitri Dolguikh over 3 years ago

  • Status changed from New to Assigned
  • Assigned To set to Dmitri Dolguikh

#9 Updated by Dmitri Dolguikh over 3 years ago

  • Status changed from Assigned to Ready For Testing

#10 Updated by Bryan Kearney over 3 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1107694

#11 Updated by Anonymous over 3 years ago

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

Also available in: Atom PDF