Project

General

Profile

Bug #17115

Subscription manager interface facts are accepted without validation

Added by Stephen Benjamin over 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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

Revision 50613a5e (diff)
Added by Stephen Benjamin over 5 years ago

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.

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

#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

Also available in: Atom PDF