Bug #17115
Subscription manager interface facts are accepted without validation
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1389063
Description of problem:
Subscription manager sends values like "Unknown" as an ip address value on RHEL 5, and these values are directly set as the host's interface's IP. As fact uploaded hosts are saved without validation, these cause errors later for things like remote execution which expects to find valid IP's in the interfaces.
How reproducible:
Always
Steps to Reproduce:
1. Have an interface on an el5 box w/out an IP
2. subscription-manager facts | grep ip shows 'Unknown' for that interface
3. Register with subscription manager
Actual results:
Host interface has 'Unknown' as IP
Expected results:
Host interface has no IP
Associated revisions
History
#1
Updated by The Foreman Bot over 5 years ago
- Status changed from New to Ready For Testing
- Assignee set to Stephen Benjamin
- Pull request https://github.com/Katello/katello/pull/6412 added
#2
Updated by Stephen Benjamin over 5 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|50613a5e50525b1782e6b57ee61a069ad596f2c2.
#3
Updated by Eric Helms over 5 years ago
- Subject changed from Subscription manager interface facts are accepted without validation to Subscription manager interface facts are accepted without validation
- Legacy Backlogs Release (now unused) set to 197
fixes #17115 - validate ip from RHSM
On older versions of RHSM, ip values can be sent as a
string 'Unknown'. Foreman historically saves hosts
facts without validation, which means the bogus
values get saved. When remote execution then tries to
use that interface's IP it hits an error.
This adds some validation to the RHSM fact parser, and
a migration to fix the bad values we may have created.