Page MenuHomeVyOS Platform

Changing pseudo-ethernet mode, throws CLI error
Closed, ResolvedPublicBUG

Description

When you have an pseudo-ethernet interface set, with mode private and then you try to change it without re-adding the interface the VyOS gives an error and is unable to commit the config.

The interface config portion:

pseudo-ethernet peth0 {
    address <snip>
    firewall {
        in {
            name PETH0_IN
        }
    }
    mac <snip>
    mode private
    source-interface eth0
}
vyos@<host># set interfaces pseudo-ethernet peth0 mode passthru
[edit]
vyos@<host># commit
[ interfaces pseudo-ethernet peth0 ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
  https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
  https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report Time:      2020-06-22 12:27:40
Image Version:    VyOS 1.3-rolling-202006200117
Release Train:    equuleus

Built by:         [email protected]
Built on:         Sat 20 Jun 2020 01:17 UTC
Build UUID:       29ee53d5-c062-4506-abe7-5e1da5c2f304
Build Commit ID:  5fc9c378b67c42

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    947dfcd3-3192-45e9-bc4e-898ceb9145c0

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-pseudo-ethernet.py", line 257, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-pseudo-ethernet.py", line 227, in apply
    p.set_mode(peth['mode'])
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/macvlan.py", line 58, in set_mode
    return self._cmd(cmd)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 48, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 179, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip link set dev peth0 type macvlan mode passthru
returned:
exit code: 2

noteworthy:
cmd 'ip link set dev peth0 type macvlan mode passthru'
returned (out):

returned (err):
RTNETLINK answers: Invalid argument

[[interfaces pseudo-ethernet peth0]] failed
Commit failed
[edit]

Details

Difficulty level
Unknown (require assessment)
Version
1.3-rolling-202006200117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

samip537 renamed this task from Pseudo-ethernet not behaving like it should to Changing pseudo-ethernet mode, throws CLI error.Jun 22 2020, 10:12 AM
SrividyaA changed the task status from Open to In progress.Jul 16 2020, 6:44 PM

This is issue is reproduced in the VyOS 1.3-rolling-202007140117 version.
While changing the mode of the pseudo-ethernet interface, the error "RTNETLINK answers: Invalid argument" is received

The following PR is created to make the modification in the interfaces-pseudo-ethernet.py script as it is not possible to change MACVLAN interface mode on the fly, this fix adds a new trigger to recreate it from scratch if the mode changed in system config

https://github.com/vyos/vyos-1x/pull/501

erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 2:13 PM
erkin removed a subscriber: Active contributors.