Red Hat Bugzilla – Bug 968102
Strip non-digit characters from non-numeric OS versions
Last modified: 2014-06-18 04:14:15 EDT
Description of problem:
I'm currently doing some development to get cisco switches under puppet management. Some of those devices report their operatingsystemrelease as '12.2(55)SE5'. When trying to push those facts to foreman with the push_facts script, the first push emits the following message and fails to populate the overview values like OS and version:
Started POST "/fact_values/create?format=yml" for 10.1.105.39 at 2013-04-04 13:47:52 +0000
Processing by FactValuesController#create as YML
No smart proxy server found on 
Failed to save switch.example.com: Validation failed: Minor is not a number
Rendered text template (0.0ms)
Completed 200 OK in 175ms (Views: 0.9ms | ActiveRecord: 67.2ms)
I've confirmed that (manually) setting the operatingsystemrelease to '12.2.(55)SE5' results in a properly populated host.
Fixed upstream in d666ad55e5417d6b47ac53b70a473d668b1140d1.
mass-triage since these are all POST/MODIFIED
the commit that fixes the issue is fe838fad64723c17a4f69d37355927214cba4592.
"This would be a bit involved to verify: you need to execute the script at (https://github.com/ohadlevy/puppet-foreman/blob/1fec77660a1d32337fc053a5789bf6116ccd7b31/foreman/files/push_facts.rb) on a puppet master machine. You could probably manually change one ' operatingsystemrelease' fact to contain non-numeric values."
There's not really an end-user consumable method to test this. QE closing.