Page MenuHomeVyOS Platform

QoS policy limiter without specified class selector error
Open, NormalPublicBUG

Description

To reproduce use match ip without class selector:

set qos interface eth1 ingress 'LIMITER'
set qos policy limiter LIMITER class 1 bandwidth '20mbit'
set qos policy limiter LIMITER class 1 burst '1mb'
set qos policy limiter LIMITER class 1 match ALL ip
set qos policy limiter LIMITER default bandwidth '20mbit'
set qos policy limiter LIMITER default burst '1mb'
commit

commit:

vyos@r4# commit
[ qos ]
DEBUG/QoS: tc qdisc add dev eth1 handle ffff: ingress
{'class': {'1': {'bandwidth': '20mbit',
                 'burst': '1mb',
                 'exceed': 'drop',
                 'match': {'ALL': {'ip': {}}},
                 'not_exceed': 'ok',
                 'priority': '20'}},
 'default': {'bandwidth': '20mbit',
             'burst': '1mb',
             'exceed': 'drop',
             'not_exceed': 'ok'}}
DEBUG/QoS: tc filter add dev eth1 parent ffff: prio 20 protocol all u32 flowid ffff:1

Report time:      2024-02-12 19:10:39
Image version:    VyOS 1.5-rolling-202402120819
Release train:    current

Built by:         [email protected]
Built on:         Mon 12 Feb 2024 10:20 UTC
Build UUID:       b1a917a9-cda4-49ad-a327-58321f1067dc
Build commit ID:  8c5299e1cf7c7b

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

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    166cfd25-7d3a-4eca-9ef6-0b655c9acf0f

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 240, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 231, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/limiter.py", line 27, in update
    super().update(config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 306, in update
    self._cmd(filter_cmd)
  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)
FileNotFoundError: [Errno 2] failed to run command: tc filter add dev eth1 parent ffff: prio 20 protocol all u32 flowid ffff:1
returned: 
exit code: 2



returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc filter add dev eth1 parent ffff: prio 20 protocol all u32 flowid ffff:1'
returned (out):

returned (err):
Error: cls_u32: Selector not specified.
We have an error talking to the kernel

If we add the correct class selector, the commit looks good, for example:

set qos policy limiter LIMITER class 1 match ALL ip protocol 'ip'
commit

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.5-rolling-202402120819
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

Viacheslav triaged this task as Normal priority.Mon, Feb 12, 5:14 PM
Viacheslav created this task.
Viacheslav updated the task description. (Show Details)