Project

General

Profile

Actions

Bug #34

closed

Foreman GUI fails on puppet client failure

Added by Moty Lavi over 14 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hi,

I have a Solaris server and I recently added to his puppet.conf "report=true"

I had a problem with my time manifest and for some reason my ntp service on the server got into maintenance mode.

The thing is that it made my Foreman interface not operational . The minute I did "svcadm clear network/ntp" and restarted puppet
forman interface got back to work.

Here is the error log I got in production.log

ActionView::TemplateError (can't convert true into String) on line #11 of vendor/plugins/active_scaffold/frontends/default/views/_list_record.html.erb:
8:
9: <tr class="record <%= tr_class %>" id="<%= element_row_id(:action => :list, :id => record.id) %>">
10:   <% active_scaffold_config.list.columns.each do |column| %>
11:     <% column_value = get_column_value(record, column) -%>
12:
13:     <td class="<%= column_class(column, column_value) %>" >
14:       <%= record.authorized_for?(:action => :read, :column => column.name) ? render_list_column(column_value, column, record) : '' %>

    app/helpers/hosts_helper.rb:7:in `last_report_column'
    vendor/plugins/active_scaffold/frontends/default/views/_list_record.html.erb:11
    vendor/plugins/active_scaffold/frontends/default/views/_list_record.html.erb:10
    vendor/plugins/active_scaffold/frontends/default/views/_list.html.erb:24
    vendor/plugins/active_scaffold/frontends/default/views/list.html.erb:30

Rendering /usr/share/puppet/rack/foreman/public/500.html (500 Internal Server Error)

I think that no client error from all kinds should damage foreman ....

Moty


Files

bad.yaml bad.yaml 1.71 KB yaml report when the service was in maintenance mode Moty Lavi, 09/30/2009 08:43 AM
good.yaml good.yaml 1.38 KB yaml report when service was ok Moty Lavi, 09/30/2009 08:43 AM
Actions #1

Updated by Ohad Levy over 14 years ago

  • Status changed from New to Assigned
  • Target version set to 0.1-2

Can you send me the good and bad report?

(if you used the store reports option, or directly from the database).

thanks

Actions #2

Updated by Moty Lavi over 14 years ago

I don't have the store option ....

The issue started when ntp service did not manage to update time from server (gap was too long) so it put himself into maintenance mode.
I've got the message:

Failed to retrieve current state of resource: Unmanageable state 'maintenance' on service network/ntp

It looks like my manifest has problems dealing with this type of state.... but still I don't know how it affect foreman...
.....
I don't fully understand "the good and bad report" ....

I can also try to reproduce this ....

Moty

Updated by Moty Lavi over 14 years ago

I reproduce the error (crashed foreman gui)

I change network/ntp to maintenance mode and got the same error.
I also added store option to my reports so attached are a good yaml and a bad one...

Hope it will help

Actions #4

Updated by Ohad Levy over 14 years ago

  • Assignee changed from Ohad Levy to Moty Lavi

can you confirm if the following solves the bug?

diff --git a/app/models/host.rb b/app/models/host.rb
index 4502808..d9cfe0c 100644
--- a/app/models/host.rb
+++ b/app/models/host.rb
@@ -124,7 +124,7 @@ class Host < Puppet::Rails::Host
   end

   def no_report
-    last_report.nil? or last_report < Time.now - 33.minutes
+    last_report.nil? or (last_report < (Time.now - 33.minutes))
   end

Actions #5

Updated by Moty Lavi over 14 years ago

No .... It does not help ....

To be more precise ..... Only the "hosts" screen is crashing , "settings","reports" and others are all working just fine....

Moty

Actions #6

Updated by Ohad Levy over 14 years ago

Moty Lavi wrote:

No .... It does not help ....

To be more precise ..... Only the "hosts" screen is crashing , "settings","reports" and others are all working just fine....

Moty

which version of puppet are you using on that host?

Actions #7

Updated by Ohad Levy over 14 years ago

  • Status changed from Assigned to Ready For Testing
  • % Done changed from 0 to 100
Actions #8

Updated by Ohad Levy over 14 years ago

  • Status changed from Ready For Testing to Closed
Actions #9

Updated by Moty Lavi over 14 years ago

fixed

Actions

Also available in: Atom PDF