Project

General

Profile

Bug #10307

Editing a host with "unattended: false" set in settings.yaml results in error.

Added by Jon Mackley over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Error is: undefined local variable or method `fqdn' for #<Host::Managed:>

Full Trace:
NameError
undefined local variable or method `fqdn' for #<Host::Managed:>
app/models/host/managed.rb:782:in `lookup_value_match'
app/models/concerns/host_common.rb:33:in `block (2 levels) in '
app/views/common_parameters/_puppetclasses_parameters.html.erb:2:in `_app_views_common_parameters__puppetclasses_parameters_html_erb__2900079543544965198_75854480'
app/views/hosts/_form.html.erb:98:in `block (2 levels) in app_views_hosts_form_html_erb__4535273548698332454_70156930040660'
app/helpers/layout_helper.rb:273:in `form_for'
app/views/hosts/_form.html.erb:8:in `block in app_views_hosts_form_html_erb__4535273548698332454_70156930040660'
app/models/taxonomy.rb:61:in `block (2 levels) in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:147:in `as_location'
app/models/taxonomy.rb:60:in `block in as_taxonomy'
app/models/concerns/foreman/thread_session.rb:112:in `as_org'
app/models/taxonomy.rb:59:in `as_taxonomy'
app/views/hosts/_form.html.erb:6:in `_app_views_hosts__form_html_erb__4535273548698332454_70156930040660'
app/views/hosts/edit.html.erb:9:in `_app_views_hosts_edit_html_erb___363706692113989275_70156930032900'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'


Related issues

Related to Foreman - Bug #10379: Facts import error: no superclass method `setup_clone' for #<Host::Managed...>Closed2015-05-05
Related to Foreman - Refactor #10413: Reimplement !unattended mode support as mainline featureNew2015-05-07
Related to Foreman - Bug #10420: Using Run Puppet button fails on Foreman 1.8.0Closed2015-05-07
Related to Foreman - Bug #10491: cant create host on 1.8 (unattended: false)Duplicate2015-05-13

Associated revisions

Revision ae274f95 (diff)
Added by Ondřej Pražák over 6 years ago

Fixes #10307 - editing host with 'unattended: false' no longer results in error

Revision 2c39c82f (diff)
Added by Ondřej Pražák over 6 years ago

Fixes #10307 - editing host with 'unattended: false' no longer results in error

(cherry picked from commit ae274f95193c3147ad563da075d0a36fb1bcff20)

History

#1 Updated by Dominic Cleal over 6 years ago

  • Category set to Web Interface
  • Legacy Backlogs Release (now unused) set to 50

#3 Updated by Ohad Levy over 6 years ago

possible workaround:

diff --git a/app/models/host/managed.rb b/app/models/host/managed.rb
index 43529d1..9f8d76f 100644
--- a/app/models/host/managed.rb
+++ b/app/models/host/managed.rb
@@ -779,6 +779,7 @@ class Host::Managed < Host::Base
   private

   def lookup_value_match
+    fqdn = self.respond_to?(:fqdn) || name || facts["fqdn"]
     "fqdn=#{fqdn}" 
   end

note, there is another issue with puppetrun that uses fqdn too.

#4 Updated by The Foreman Bot over 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2338 added
  • Pull request deleted ()

#5 Updated by Dominic Cleal over 6 years ago

  • Assignee set to Ondřej Pražák

#6 Updated by Marek Hulán over 6 years ago

  • Related to Bug #10379: Facts import error: no superclass method `setup_clone' for #<Host::Managed...> added

#7 Updated by Dominic Cleal over 6 years ago

  • Related to Refactor #10413: Reimplement !unattended mode support as mainline feature added

#8 Updated by Ryan Sabatini over 6 years ago

  • Related to Bug #10420: Using Run Puppet button fails on Foreman 1.8.0 added

#9 Updated by Ondřej Pražák over 6 years ago

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

#10 Updated by Marek Hulán over 6 years ago

  • Related to Bug #10491: cant create host on 1.8 (unattended: false) added

Also available in: Atom PDF