Project

General

Profile

Actions

Bug #9188

open

New host progress bar throws 500

Added by Lukas Zapletal over 9 years ago. Updated about 7 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Discovery plugin
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

It looks like the progress bar does not work well.

This is what I see when I (successfuly) provision a server:

Started GET "/discovered_hosts/mac5254003f972e/edit" for 127.0.0.1 at 2015-02-02 14:23:44 +0100
Processing by DiscoveredHostsController#edit as */*
  Parameters: {"id"=>"mac5254003f972e"}
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1  [["id", 1]]
Setting current user thread-local variable to admin
   (0.2ms)  SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization')
Setting current organization thread-local variable to none
   (0.1ms)  SELECT COUNT(*) FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location')
Setting current location thread-local variable to none
  AuthSource Load (0.2ms)  SELECT "auth_sources".* FROM "auth_sources" WHERE "auth_sources"."id" = 1 LIMIT 1
   (0.1ms)  SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') LIMIT 1
   (0.1ms)  SELECT id FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') LIMIT 1
  Host::Discovered Load (0.3ms)  SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered') AND "hosts"."id" = 0 LIMIT 1
  Host::Discovered Load (0.3ms)  SELECT "hosts".* FROM "hosts" WHERE "hosts"."type" IN ('Host::Discovered') AND "hosts"."name" = 'mac5254003f972e' LIMIT 1
  Organization Load (0.2ms)  SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Organization') ORDER BY title LIMIT 1
  Location Load (0.2ms)  SELECT "taxonomies".* FROM "taxonomies" WHERE "taxonomies"."type" IN ('Location') ORDER BY title LIMIT 1
  Rendered hosts/edit.html.erb within layouts/application (1.2ms)
Completed 500 Internal Server Error in 19.3ms

ActionView::Template::Error (undefined method `managed?' for nil:NilClass):
    1: <% title(_("Edit %s") % @host) %>
    2: <% if SETTINGS[:unattended] %>
    3:   <% title_actions display_link_if_authorized((@host.managed? ? _("Unmanage host") : _("Manage host")),
    4:     hash_for_toggle_manage_host_path(:id => @host).merge(:auth_object => @host, :permission => 'edit_hosts'), {:method => :put}),
    5:     display_link_if_authorized(_("Disassociate host"),
    6:     hash_for_disassociate_host_path(:id => @host).merge(:auth_object => @host, :permission => 'edit_hosts'), :method => :put) %>
  app/views/hosts/edit.html.erb:3:in `_1f7fee65d6da181604fece9db5bbc2e9'
  app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
  lib/middleware/catch_json_parse_errors.rb:9:in `call'

  Rendered /home/lzap/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.21/lib/action_dispatch/middleware/templates/rescues/_trace.erb (1.3ms)
  Rendered /home/lzap/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.21/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.1ms)
  Rendered /home/lzap/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/actionpack-3.2.21/lib/action_dispatch/middleware/templates/rescues/template_error.erb within rescues/layout (8.7ms)

The 500 error is received (and ignored) by:

function animate_progress(){
  if (stop_pooling == true) return;
  setTimeout(function() {
    var url = $('#host_progress_report_id').data('url');
    $.get(url, function (response){
       update_progress(response);
       animate_progress();
    })
  }, 1600);
}

Fortunately no blocker effects.

Actions #1

Updated by Lukas Zapletal about 7 years ago

  • Difficulty set to trivial

Not sure if this is still valid bug, might have been fixed already.

Actions

Also available in: Atom PDF