Bug #5136
closedStatistics controller breaks when running facter 1.7.x
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
Updated by Ohad Levy about 8 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!