Page MenuHomeVyOS Platform

Removing PPPoE interface in smoketests and throw a PermissionError
Closed, ResolvedPublicBUG

Description

Calling remove on a PPPoE interface that is already gone will also call flush_addrs() which can - if the interface is already gone - throw an error.

>>> from vyos.ifconfig import PPPoEIf
>>> tmp = PPPoEIf('pppoe10000')
>>> tmp.flush_addrs()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1361, in flush_addrs
    self._cmd(cmd)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 66, in _cmd
    return cmd(command, self.debug, env=env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 189, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: None  ip addr flush dev pppoe10000
returned:
exit code: 1

Details

Version
2025.10.07-0019-rolling
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po changed the task status from Open to In progress.
c-po claimed this task.
c-po triaged this task as Normal priority.