Page MenuHomeVyOS Platform

[QoS] Policy round-robin is broken without classes
In progress, LowPublicBUG

Description

Unhandled exception when we try to delete an existing(only once) class

step to reproduce:

conf
set qos interface eth1 egress 'test'
set qos policy round-robin test class 1 match test_match ip dscp 'network'
set qos policy round-robin test default codel-quantum '1000'
set qos policy round-robin test default flows '5'
set qos policy round-robin test default queue-type 'priority'
set qos policy round-robin test default target '10'
set qos policy round-robin test description 'test desc'
commit
del qos policy round-robin test class 1
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-10-22 10:42:59
Image version:    VyOS 1.4.1-beta1
Release train:    sagitta

Built by:         Daniil Baturin <daniil@vyos.io>
Built on:         Fri 18 Oct 2024 12:42 UTC
Build UUID:       b2a9ec78-43ba-4b1d-8c6e-b12be35ee68c
Build commit ID:  0285f0f2f9bbb3-dirty

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:    c06a5ce0-5e5b-4be4-9b54-f54866088f11

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 262, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 253, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/roundrobin.py", line 37, in update
    default_cls_id = int(class_id_max) +1
                     ^^^^^^^^^^^^^^^^^
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

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 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.

[[qos]] failed
Commit failed

Details

Version
VyOS 1.4.1-beta1
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)