[Idea] Fix distinct IPv4/IPv6 interface names for LXC #811
Replies: 2 comments
-
Hi @MiniPierre interesting. I've myself that case. If I generate a partial network inventory in my glpi 10.0.17 lxc instance with
Imported in glpi, that asset has 5 network interfaces: If I edit the inventory to fix "description" with This is probably a bug, I'll check if this is safe to fix it. But my first thinking after a quick check is we can. |
Beta Was this translation helpful? Give feedback.
-
Hi @MiniPierre I just pushed a fix here: ab45f01 It will be integrated in next nightly build if you want to test and validate the fix. I discovered few cases in unittests which involves the same kind of issue but in other cases. Can you tell me if you now see what you expect in GLPI with that fix ? |
Beta Was this translation helpful? Give feedback.
-
Your idea
When using a LXC container, network configuration sent to GLPI does not link IPv4 and IPv6 addresses to the same interface.
This is due to the following reason:
On LXC server, interfaces names are attached to one of the physical host interfaces, are named
{{ interface_name }}@{{ host_interface_name }}
, for exampleeth0@if38
.For inet6 lines, the interface is left as is:
But for inet lines, the last word is used to replace interface name:
Thus, with the following configuration, IPv4 and IPv6 are not declared on the same interface (eth0 for IPv4, eth0@if10 for IPv6):
I suppose there is a good reason to have done things that way, but it is quite a pain when trying to retrieve an interface IPs from GLPI. Would be nice to have a fix at least for attached interfaces
Beta Was this translation helpful? Give feedback.
All reactions