Project

General

Profile

Actions

Bug #10307

closed

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

Added by Jon Mackley almost 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Web Interface
Target version:
Difficulty:
Triaged:
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 4 (0 open4 closed)

Related to Foreman - Bug #10379: Facts import error: no superclass method `setup_clone' for #<Host::Managed...>ClosedMarek Hulán05/05/2015Actions
Related to Foreman - Refactor #10413: Reimplement !unattended mode support as mainline featureClosedTomer BriskerActions
Related to Foreman - Bug #10420: Using Run Puppet button fails on Foreman 1.8.0ClosedDominic Cleal05/07/2015Actions
Related to Foreman - Bug #10491: cant create host on 1.8 (unattended: false)Duplicate05/13/2015Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Category set to Web Interface
  • translation missing: en.field_release set to 50
Actions #3

Updated by Ohad Levy almost 9 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.

Actions #4

Updated by The Foreman Bot almost 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

  • Assignee set to Ondřej Pražák
Actions #6

Updated by Marek Hulán almost 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

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

Updated by Ryan Sabatini almost 9 years ago

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

Updated by Ondřej Pražák almost 9 years ago

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

Updated by Marek Hulán almost 9 years ago

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

Also available in: Atom PDF