Page MenuHomeVyOS Platform

Unhandled exception when setting priority-queue QoS policy type to random-detect
Closed, ResolvedPublicBUG

Description

Can not use random-detect queue for class or default queue

step to reproduce:

conf
set qos interface eth1 egress 'test'
set qos policy priority-queue test class 1 match test_match ip dscp 'network'
set qos policy priority-queue test class 1 queue-type 'priority'
set qos policy priority-queue test default queue-type 'priority'
set qos policy priority-queue test description 'test desc'
commit
set qos policy priority-queue test default queue-type random-detect
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 09:45:56
Image version:    VyOS 1.4.1-beta1
Release train:    sagitta

Built by:         Daniil Baturin <[email protected]>
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/priority.py", line 40, in update
    super().update(config, direction, priority=True)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 236, in update
    self._build_base_qdisc(cls_config, int(cls))
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 165, in _build_base_qdisc
    qparams = self._calc_random_detect_queue_params(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 96, in _calc_random_detect_queue_params
    avg_pkt = int(avg_pkt)
              ^^^^^^^^^^^^
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?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

HollyGurza changed the subtype of this task from "Task" to "Bug".
HollyGurza changed the task status from Open to In progress.Oct 25 2024, 1:12 PM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
dmbaturin renamed this task from [QoS] Policy priority-queue can't use random-detect queue type to Unhandled exception when setting priority-queue QoS policy type to random-detect.Wed, Mar 12, 5:45 PM
dmbaturin closed this task as Resolved.
dmbaturin moved this task from Backlog to Finished on the VyOS 1.4 Sagitta (1.4.2) board.