ftao / python-ifcfg

Python cross-platform network interface discovery (ifconfig/ipconfig/ip)
BSD 3-Clause "New" or "Revised" License
55 stars 37 forks source link

RuntimeError: Tried to add ether multiple times #73

Open tonyle72 opened 1 year ago

tonyle72 commented 1 year ago

I'm getting the following error when polling interfaces via ifcfg:

Traceback (most recent call last):
  . . .
  File "/usr/local/lib/python3.8/dist-packages/ifcfg/__init__.py", line 70, in interfaces
    return Parser(ifconfig=ifconfig).interfaces
  File "/usr/local/lib/python3.8/dist-packages/ifcfg/parser.py", line 34, in __init__
    self.parse(self.ifconfig_data)
  File "/usr/local/lib/python3.8/dist-packages/ifcfg/parser.py", line 91, in parse
    raise RuntimeError(
RuntimeError: Tried to add ether=02:42:8d:9b:07:ec multiple times to docker0, it was already: 02:42:39:b2:29:bb

This may be related to issues #34 and #59 as it appears to be complaining about docker0's gateway:

$ ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        . . .
        ether 02:42:39:b2:29:bb  txqueuelen 0  (Ethernet)
        . . .

docker_gwbridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        . . .
        ether 02:42:8d:9b:07:ec  txqueuelen 0  (Ethernet)
        . . .

How to proceed?