Bug #1953
closed
statistics page: Unknown string: "1.50 gb"!
Added by Sam McLeod about 12 years ago.
Updated almost 11 years ago.
Description
RuntimeError
Unknown string: "1.50 gb"!
lib/core_extensions.rb:98:in `to_gb'
app/models/fact_value.rb:78:in `to_gb'
app/models/fact_value.rb:77:in `map'
app/models/fact_value.rb:77:in `to_gb'
app/models/fact_value.rb:38:in `mem_average'
app/controllers/statistics_controller.rb:10:in `index'
Running Foreman Version 1.0.1
Puppet 2.6.2
Debian Stable
yep... still got this issue...
- Category set to Facts
- Status changed from New to Feedback
It looks like the "GB" in your memorysize
fact is coming in lower cased. We can add code to handle this, but I haven't ever seen it before - Facter always uses capitalised units.
Are they capitalised when running "facter -p" on your hosts? If you check the Facts page, is it only certain hosts?
Dominic Cleal wrote:
Are they capitalised when running "facter -p" on your hosts? If you check the Facts page, is it only certain hosts?
Thanks for pointing me in the right direction,
using the facts page I searched for ' fact = memorysize and value ~ gb ' , turns out only two of our 350~ hosts have reported gb (in lower case).
Funny thing is, neither of these two hosts are actually puppet controlled, they were just tested with puppet so a report must have been generated and for whatever reason with lower case.
This iludes to another problem we're having where old reports are being expired even though we're currently running 'rake reports:expire days=7 RAILS_ENV="production" ' in /usr/share/foreman/ every day.
Whoops I should have mentioned that running facter -p on the host that Foreman was seeing with lower case gb, did in fact (no pun intended) return with upper case!
memorysize => 2.00 GB
Sam McLeod wrote:
Dominic Cleal wrote:
Are they capitalised when running "facter -p" on your hosts? If you check the Facts page, is it only certain hosts?
Thanks for pointing me in the right direction,
using the facts page I searched for ' fact = memorysize and value ~ gb ' , turns out only two of our 350~ hosts have reported gb (in lower case).
Funny thing is, neither of these two hosts are actually puppet controlled, they were just tested with puppet so a report must have been generated and for whatever reason with lower case.
Ok, thanks for confirming.
This iludes to another problem we're having where old reports are being expired even though we're currently running 'rake reports:expire days=7 RAILS_ENV="production" ' in /usr/share/foreman/ every day.
I've just run this on Foreman 1.1 without a problem and it correctly deleted a load of old reports. Try running it interactively and with -t, see if there are any errors.
Hello,
Could you have tested what Dominic suggested you? Do you still have the issue?
- Description updated (diff)
- Status changed from Feedback to Closed
Hello,
I'm closing the bug as the opener did not answer. If you still encounter the issue, feel free to reopen the bug or fill a new one.
Regards
Also available in: Atom
PDF