Project

General

Profile

Bug #11251

Unable to save host due to 'some of the interfaces are invalid' error

Added by Josh Baird about 6 years ago. Updated over 5 years ago.

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

Description

I have a number of managed hosts that were provisioned prior to the networking changes in 1.8. When I attempt to edit one of them (to add a puppet class or whatnot), I get an error:

Some of the interfaces are invalid. Please check the table below.

These hosts all have a combination of physical and virtual interfaces (bonds). I have uploaded images from two different examples. In one, it is showing two eth0 interfaces (and no eth4 interface). In each of these cases, the IP addresses are assigned to bond0. When I try to manually fix the errors, and re-save the form, the form reverts to it's original state and the same error is displayed. I'm unable to save any changes to these hosts.

I have also uploaded the facts from each of the hosts.

interfaces_2.png View interfaces_2.png 24.7 KB Josh Baird, 07/29/2015 03:14 PM
interfaces_1.png View interfaces_1.png 51.8 KB Josh Baird, 07/29/2015 03:14 PM
facts_1 facts_1 8.6 KB Josh Baird, 07/29/2015 03:14 PM
facts_2 facts_2 6.44 KB Josh Baird, 07/29/2015 03:14 PM
Interfaces 2 Interfaces 1

Related issues

Related to Foreman - Bug #11034: network/interfaces validation checks the removed interfaces Closed2015-07-07
Related to Foreman - Refactor #11442: When host is created from facts we don't trigger validationsNew2015-08-20

History

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

As a quick workaround you can edit/destroy duplicated interfaces using API. The UI validates interfaces and fails since you're already in inconsistent state. If reimporting the facts causes adding invalid interfaces again, you can turn it off by setting ignore_puppet_facs_for_provisioning setting to true, this will disable all interface changes based on incoming facts.

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

  • Related to Bug #11034: network/interfaces validation checks the removed interfaces added

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

  • Status changed from New to Need more information
  • Assignee set to Marek Hulán

I tried to import the provided facts which created interfaces correctly. The reason why you see duplicated IPs is because when you provisioned the host, eth0 got some IP and then you enabled bond on the host. Then facts came in and created bond with the same IP. We sadly don't obey validations there, maybe we should finally fix this. Anyway once you get into inconsistent state, UI won't let you fix it easily. In your case you can set IP to be blank, save the host and then get back and set the right IP just on the bond. Tested with host created by facts_2. Please let us know if it helps.

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

  • Related to Refactor #11442: When host is created from facts we don't trigger validations added

#5 Updated by Josh Baird almost 6 years ago

I have tested this workaround and it seems to be fine.

#6 Updated by Marek Hulán almost 6 years ago

  • Status changed from Need more information to Resolved

Thank you, I'm changing this to be resolved and to prevent the original cause, I opened #11442. Thank you for the report and quick response. If similar issue will be reported we would need to reimplement the IP validation since the one from Rails can not handle this situation.

Also available in: Atom PDF