Bug #34
closed
Foreman GUI fails on puppet client failure
Added by Moty Lavi over 15 years ago.
Updated about 15 years ago.
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
|
|
- 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
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
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
- 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
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
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?
- Status changed from Assigned to Ready For Testing
- % Done changed from 0 to 100
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF