Bug 968102

Summary: Strip non-digit characters from non-numeric OS versions
Product: Red Hat Satellite Reporter: Sam Kottler <skottler>
Component: ProvisioningAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED NOTABUG QA Contact: Corey Welton <cwelton>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: NightlyCC: dmitri, ohadlevy
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-12 18:31:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sam Kottler 2013-05-29 02:35:23 UTC
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
  Parameters: {"facts"=>"[FILTERED]"}
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.


Additional info:
Fixed upstream in d666ad55e5417d6b47ac53b70a473d668b1140d1.

Comment 1 Mike McCune 2013-05-29 22:36:48 UTC
mass-triage since these are all POST/MODIFIED

Comment 2 Dmitri Dolguikh 2013-06-12 11:33:15 UTC
the commit that fixes the issue is fe838fad64723c17a4f69d37355927214cba4592.

Comment 3 Corey Welton 2013-06-12 18:29:50 UTC
"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."

Comment 4 Corey Welton 2013-06-12 18:31:04 UTC
There's not really an end-user consumable method to test this.  QE closing.