Bug #10307
closedEditing a host with "unattended: false" set in settings.yaml results in error.
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'
Updated by Dominic Cleal over 9 years ago
- Category set to Web Interface
- Translation missing: en.field_release set to 50
Updated by Ohad Levy over 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.
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/2338 added
- Pull request deleted (
)
Updated by Marek Hulán over 9 years ago
- Related to Bug #10379: Facts import error: no superclass method `setup_clone' for #<Host::Managed...> added
Updated by Dominic Cleal over 9 years ago
- Related to Refactor #10413: Reimplement !unattended mode support as mainline feature added
Updated by Ryan Sabatini over 9 years ago
- Related to Bug #10420: Using Run Puppet button fails on Foreman 1.8.0 added
Updated by Ondřej Pražák over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ae274f95193c3147ad563da075d0a36fb1bcff20.
Updated by Marek Hulán over 9 years ago
- Related to Bug #10491: cant create host on 1.8 (unattended: false) added