Project

General

Profile

Actions

Bug #12237

closed

Provisioning of discovered host failed with error: Safemode doesn't allow to access 'resbody' on rescue

Added by Sachin Ghai over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

I was trying new foreman-discovery release rpms with fdi-bootable-3.0.2.iso. And host was discovered successfully but while provisioning the host got:

| Started POST "/discovered_hosts/mac52540024d723/auto_provision" for 10.10.48.210 at 2015-10-21 07:38:27 -0400
2015-10-21 07:38:27 [app] [I] Processing by DiscoveredHostsController#auto_provision as HTML
2015-10-21 07:38:27 [app] [I]   Parameters: {"authenticity_token"=>"a60tVFhlmigeFvUJgSTPpqf7pROjwhMZ+imi95HHerk=", "id"=>"mac52540024d723"}
2015-10-21 07:38:27 [app] [I] Match found for host mac52540024d723 (9) rule testrule:) (1)
2015-10-21 07:38:28 [app] [I] Add DNS A record for mac52540024d723./192.168.100.19
2015-10-21 07:38:28 [app] [I] Add DNS PTR record for 192.168.100.19/mac52540024d723.
2015-10-21 07:38:28 [app] [I] Redirected to https://foreman-server/discovered_hosts
2015-10-21 07:38:28 [app] [W] Reloading kernel on mac52540024d723.domain.com task failed with the following error: Safemode doesn't allow to access 'resbody' on rescue
 |   "" 
 | Safemode::SecurityError: Safemode doesn't allow to access 'resbody' on rescue
 |   "" 
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode/parser.rb:125:in `raise_security_error'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode/parser.rb:113:in `block (2 levels) in <class:Parser>'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:218:in `block (2 levels) in process'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:275:in `error_handler'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:217:in `block in process'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:340:in `in_context'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:194:in `process'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/ruby2ruby-2.1.3/lib/ruby2ruby.rb:778:in `process_rescue'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/safemode-1.2.2/lib/safemode/parser.rb:112:in `block (2 levels) in <class:Parser>'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:218:in `block (2 levels) in process'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:275:in `error_handler'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:217:in `block in process'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:340:in `in_context'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/sexp_processor-4.4.4/lib/sexp_processor.rb:194:in `process'

on previewing the kexec template following error raised:

 There was an error rendering the Discovery Red Hat kexec template: Safemode doesn't allow to access 'iasgn' on @mac = @host.to_jail.facts.to_jail["discovery_bootif"]

reproducible with:

[root@cloud-qe-xx ~]# rpm -qa | grep discovery
tfm-rubygem-foreman_discovery-4.1.1-1.fm1_11.el7.noarch
tfm-rubygem-hammer_cli_foreman_discovery-doc-0.0.2-3.el7.noarch
rubygem-smart_proxy_discovery-doc-1.0.3-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_discovery-0.0.2-3.el7.noarch
rubygem-smart_proxy_discovery-1.0.3-1.el7.noarch


Related issues 1 (0 open1 closed)

Related to Discovery - Tracker #10294: PXEless discovery featureClosedLukas Zapletal04/28/2015

Actions
Actions #1

Updated by Sachin Ghai over 9 years ago

Actions #2

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_discovery/pull/224 added
  • Pull request deleted ()
Actions #3

Updated by Anonymous over 9 years ago

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

Also available in: Atom PDF