Project

General

Profile

Refactor #11442

When host is created from facts we don't trigger validations

Added by Marek Hulán about 6 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

For some reasons (bad and good) validations are disabled when host is created through facts/reports. One reason could be that we don't have all information until we parse facts, second could be that we want to save the host even if there are important attributes missing so user can fix it, third I've read in comments was speed. I think at least third is not valid. This causes issues which gets host into inconsistent state (e.g. two interfaces with same IP) that can't be easily fixed in UI and workarounds like using API are required.

I think we should run validations and refuse saving invalid host. An easier variant would be to ignore interface import for invalid hosts.


Related issues

Related to Foreman - Bug #11251: Unable to save host due to 'some of the interfaces are invalid' errorResolved2015-07-29
Related to Foreman - Bug #7344: unable to import interface facts for certiain network configurationClosed2014-09-03

History

#1 Updated by Marek Hulán about 6 years ago

  • Related to Bug #11251: Unable to save host due to 'some of the interfaces are invalid' error added

#2 Updated by Marek Hulán over 5 years ago

Or just skip invalid interface imports. I'd still incline to validate hosts and not saving invalid hosts.

#3 Updated by Marek Hulán almost 5 years ago

Ignoring invalid interfaces was btw introduced in #7344

#4 Updated by Marek Hulán almost 5 years ago

  • Related to Bug #7344: unable to import interface facts for certiain network configuration added

Also available in: Atom PDF