Project

General

Profile

Actions

Bug #1953

closed

statistics page: Unknown string: "1.50 gb"!

Added by Sam McLeod over 11 years ago. Updated about 10 years ago.

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

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

Actions #1

Updated by Sam McLeod over 11 years ago

yep... still got this issue...

Actions #2

Updated by Dominic Cleal over 11 years ago

  • 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?

Actions #3

Updated by Sam McLeod over 11 years ago

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.

Actions #4

Updated by Sam McLeod over 11 years ago

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
Actions #5

Updated by Dominic Cleal over 11 years ago

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.

Actions #6

Updated by Benjamin Papillon almost 11 years ago

Hello,

Could you have tested what Dominic suggested you? Do you still have the issue?

Actions #7

Updated by Benjamin Papillon about 10 years ago

  • 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

Actions

Also available in: Atom PDF