Project

General

Profile

Actions

Bug #5136

closed

Statistics controller breaks when running facter 1.7.x

Added by Thomas Wahlberg almost 10 years ago. Updated about 7 years ago.

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

Description

The conversion of memory units breaks in facter version 1.7.5 and above.
Statistics page leaves you with a stacktrace (see below) as facter introduce new facter names for memory:

memoryfree => 1.21 GB
memoryfree_mb => 1236.13
memorysize => 7.75 GB
memorysize_mb => 7941.05

Facter 1.6 and older

memoryfree => 1.21 GB
memorysize => 7.75 GB

RuntimeError
Unknown string: "64375.80078125"!
lib/core_extensions.rb:91:in `rescue in to_gb'
lib/core_extensions.rb:80:in `to_gb'
app/models/fact_value.rb:80:in `block in to_gb'
app/models/fact_value.rb:79:in `map'
app/models/fact_value.rb:79:in `to_gb'
app/models/fact_value.rb:45:in `mem_average'
app/controllers/statistics_controller.rb:10:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'


Files

foreman_facter_conversion.txt foreman_facter_conversion.txt 1.23 KB to_gb function in irb Thomas Wahlberg, 04/10/2014 06:23 AM
Actions #1

Updated by Ohad Levy about 7 years ago

  • Status changed from New to Resolved

I'm unable to reproduce this on recent version, please reopen if you can reproduce this.

thanks!

Actions

Also available in: Atom PDF