Page MenuHomeVyOS Platform

QoS CAKE config with PPPoE interface does not load after reboot
Closed, ResolvedPublicBUG

Description

Original reddit message

step to reproduce:

conf
set interfaces input ifb0
set interfaces pppoe pppoe0 source-interface 'ifb0'
set qos interface ifb0 egress 'CAKE-WAN-IN'
set qos interface pppoe0 egress 'CAKE-WAN-OUT'
set qos policy cake CAKE-WAN-IN bandwidth '25mbit'
set qos policy cake CAKE-WAN-IN flow-isolation nat
set qos policy cake CAKE-WAN-IN rtt '13'
set qos policy cake CAKE-WAN-OUT bandwidth '3800kbit'
set qos policy cake CAKE-WAN-OUT flow-isolation nat
set qos policy cake CAKE-WAN-OUT rtt '13'
commit

After this commit, we have a warning:

WARNING: Interface "pppoe0" does not exist!

after reboot we have load config error:

save
exit
reboot
...
[   20.346820] vyos-router[960]: Waiting for NICs to settle down: settled in 0sec..
[   23.612729] vyos-router[960]: Mounting VyOS Config...done.
[   35.290052] vyos-router[960]: Starting VyOS router: migrate system configure failed!
[   36.115049] vyos-config[966]: Configuration error

debug load config:

conf
load
vyos@vyos# commit
[ qos ]
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):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us 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:      2024-08-06 08:16:00
Image version:    VyOS 1.5-rolling-202407050020
Release train:    current

Built by:         [email protected]
Built on:         Fri 05 Jul 2024 02:47 UTC
Build UUID:       df7f936c-c39e-41dc-9c03-89109d237213
Build commit ID:  8ec205dd21f91d

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:    af522d0a-274c-4c51-aca0-3215606aaada

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 329, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 319, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/cake.py", line 54, in update
    self._cmd(tmp)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 75, in _cmd
    return cmd(command)
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: tc qdisc add dev pppoe0 root handle 1: cake egress bandwidth 3800000 rtt 13ms nat
returned: 
exit code: 1

noteworthy:
cmd 'tc qdisc del dev lo parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev lo root'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc del dev eth0 parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev eth0 root'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc del dev eth1 parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev eth1 root'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc del dev eth2 parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev eth2 root'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc del dev eth3 parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev eth3 root'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc del dev pim6reg parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev pim6reg root'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc del dev ifb0 parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc add dev pppoe0 root handle 1: cake egress bandwidth 3800000 rtt 13ms nat'
returned (out):

returned (err):
Cannot find device "pppoe0"

[[qos]] failed
Commit failed

Details

Difficulty level
Unknown (require assessment)
Version
1.5-rolling-202407050020
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Related Objects

Event Timeline

Viacheslav triaged this task as Normal priority.Aug 6 2024, 9:35 AM
jestabro subscribed.

There are competing needs between this bug and T6131 regarding verify_interface_exists: in T6131, one just needs to know if the interface is defined in the config in order to configure OSPF; here one needs to know that it exists in state for the cmd 'tc ...' to operate upon it, but verify_interface_exists returns True for syntactic existence, before the interface is up. A quick workaround may be to add a keyword arg to require only state verification (default False), with or without warning_only, in order to skip return True on syntactic existence only.

The second issue regarding verify_interface_exists is mentioned in item 1 of T6639: calling an independent Config* object within the function will miss the ambient config of vyos-configd, only picking up the effective config. This has the immediate effect of hiding the bug under configtest for vrf-bgp-pppoe-underlay.

jestabro changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.Aug 8 2024, 3:16 PM
jestabro changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).

PR for the first issue:
https://github.com/vyos/vyos-1x/pull/3960

The second issue is straightforward, though will need full tests to be run, in case it exposes issues obscured by the incorrect syntactic check; this should probably be split off to a subtask.

jestabro changed the task status from Open to In progress.Aug 8 2024, 5:17 PM