Project

General

Profile

Bug #10384

Editing host can fail unexpectedly: "Failed to save: Interfaces some interfaces are invalid"

Added by Martin Jackson over 6 years ago. Updated over 6 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

Started PUT "/hosts/glamdring.minas.tirith" for 192.168.4.100 at 2015-05-05 14:05:23 -0500
2015-05-05 14:05:23 [I] Processing by HostsController#update as */*
2015-05-05 14:05:23 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"B1fUG1XPrFvVJ4EF3n+MEfwY8ZXIdOs9pr/4C9J7ZSo=", "host"=>{"name"=>"glamdring.minas.tirith", "hostgroup_id"=>"12", "environment_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "config_group_ids"=>[""], "puppetclass_ids"=>[""], "managed"=>"f", "progress_report_id"=>"[FILTERED]", "is_owned_by"=>"7-Users", "enabled"=>"1", "model_id"=>"10", "comment"=>"", "overwrite"=>"false"}, "id"=>"glamdring.minas.tirith"}
2015-05-05 14:05:23 [I] Failed to save: Interfaces some interfaces are invalid


Related issues

Related to Foreman - Feature #10260: Allow interfaces management for unmanaged hostsClosed2015-04-24

History

#1 Updated by Martin Jackson over 6 years ago

Found in 1.8.0; sorry, I hit the "enter" key too soon.

#2 Updated by Dominic Cleal over 6 years ago

  • Category set to Network
  • Legacy Backlogs Release (now unused) set to 50

If you go back to the interfaces tab and click edit next to each interface, do any of them show errors there? It should assign errors to the individual interfaces, even if it isn't logging them.

#3 Updated by Martin Jackson over 6 years ago

I had rebuilt this host (actually moved the disk in from another one). The NICs in the database from the old machine are still there; and the new ones have duplicate names (e.g. br100, eth1, eth0.2, etc). My guess is that foreman's heartburn is with the duplicated names, since all the ones that are like that are "errored". I've deleted the Nics from the DB directly; unfortunately now the "name" field in the host record is blank and the database throws a nasty looking SQL error when I try to edit it.


Identifier    Type    MAC address    IP address    FQDN    
br100    Interface
virtual
f8:b1:56:b2:4c:35            Edit  Delete
br100    Interface
virtual
90:2b:34:52:54:b3            Edit  Delete
br2    Interface
virtual
f8:b1:56:b2:4c:35            Edit  Delete
br2    Interface
virtual
90:2b:34:52:54:b3            Edit  Delete
br4    Interface
virtual
90:2b:34:52:54:b3            Edit  Delete
br4    Interface
virtual
f8:b1:56:b2:4c:35            Edit  Delete
br5    Interface
virtual
90:2b:34:52:54:b3    192.168.5.8        Edit  Delete
br900    Interface
virtual
00:0a:cd:27:c9:ce    192.168.129.8        Edit  Delete
eth0    Interface
physical
f8:b1:56:b2:4c:35            Edit  Delete
eth0.100    Interface
virtual attached to eth0
f8:b1:56:b2:4c:35            Edit  Delete
eth0.2    Interface
virtual attached to eth0
f8:b1:56:b2:4c:35            Edit  Delete
eth0.4    Interface
virtual attached to eth0
f8:b1:56:b2:4c:35            Edit  Delete
eth1    Interface
physical
90:2b:34:52:54:b3        glamdring.minas.tirith    Edit  Delete
eth1    Interface
physical
00:0a:cd:27:c9:ce            Edit  Delete
eth1.100    Interface
virtual attached to eth1
90:2b:34:52:54:b3            Edit  Delete
eth1.2    Interface
virtual attached to eth1
90:2b:34:52:54:b3            Edit  Delete
eth1.4    Interface
virtual attached to eth1
90:2b:34:52:54:b3            Edit  Delete
wlan0    Interface
physical
34:23:87:1c:6c:95            Edit  Delete

#4 Updated by Martin Jackson over 6 years ago

Sorry for the spam; the blank hostname was because the managed flag was still set. I unset it, and the name came back in the box. After a puppet run, the interface list looks more reasonable; I can edit the host again.

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

If I understand correctly, it seems that virtual devices got different mac address and get reimported. We don't delete virtual devices that are missing in next fact import on purpose, because they might be just temporarily down (alias/vlans/bridges). Also we can't update the virtual device based on name only, if they have different mac they might be different devices that just turns up and down. So I think this is expected behaviour and not a bug?

#6 Updated by Martin Jackson over 6 years ago

OK, I can understand why the old names aren't removed, and this particular case (moving a hard drive from one machine to another) is uncommon. With unmanaged hosts, though, I think there should be a clearly visible way to reset the NICs, which there currently isn't. I understand that may not be feasible for 1.8.1, but maybe for a later release?

#7 Updated by Marek Hulán over 6 years ago

  • Related to Feature #10260: Allow interfaces management for unmanaged hosts added

#8 Updated by Marek Hulán over 6 years ago

Would implementing #10260 solve it?

#9 Updated by Martin Jackson over 6 years ago

Yes, I believe it would.

#10 Updated by Marek Hulán over 6 years ago

  • Status changed from New to Resolved

Ok, thank you, closing this one.

#11 Updated by Dominic Cleal over 6 years ago

  • Legacy Backlogs Release (now unused) deleted (50)

Also available in: Atom PDF