Page MenuHomeVyOS Platform

QoS doesn't work correctly root task
Closed, ResolvedPublicBUG

Description

My outbound to tun0 interface has been limited to 330Mbps by carrier company.

I want to keep OSPF/BGP packet when the interface is under heavy load. So I wrote this policy, and it result a commit error.

vyos@bsp-asbr2-cm# show qos policy 
 shaper test {
     bandwidth 330mbit
     class 10 {
         bandwidth 320mbit
         match ospf {
             ip {
                 protocol ospf
             }
         }
         queue-type fair-queue
     }
     default {
         bandwidth 300mbit
         queue-type fair-queue
     }
 }
[edit]
vyos@bsp-asbr2-cm# set qos int tun0 eg test
[edit]
vyos@bsp-asbr2-cm# commit
[ qos ]
VyOS had an issue completing a command.


Report time:      2023-03-03 10:31:49
Image version:    VyOS 1.4-rolling-202302150317
Release train:    current

Built by:         [email protected]
Built on:         Wed 15 Feb 2023 03:17 UTC
Build UUID:       e62b2d4d-c09c-4dd6-a722-884b782e4d13
Build commit ID:  5207b6f510d677

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware20,1
Hardware S/N:     VMware-56 4d fb 13 43 c4 e5 63-b0 9e 49 a8 b7 33 09 da
Hardware UUID:    13fb4d56-c443-63e5-b09e-49a8b73309da

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 255, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 246, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/trafficshaper.py", line 100, in update
    super().update(config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 246, in update
    self._cmd(filter_cmd)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 36, in _cmd
    return cmd(command)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: tc filter replace dev tun0 parent 1: protocol all u32 match ip protocol ospf 0xff action police rate 320000000 burst 15k flowid 1:a
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 filter replace dev tun0 parent 1: protocol all u32 match ip protocol ospf 0xff action police rate 320000000 burst 15k flowid 1:a'
returned (out):

returned (err):
Illegal "match"

[[qos]] failed
Commit failed
[edit]
vyos@bsp-asbr2-cm#

Btw, when I enable a 300mbit/s shaper on tunnel, the actual limit is around 140-150mbit/s, iperf3 said lots of retry.

vyos@bsp-asbr2-cm# show qos
 interface tun0 {
     egress test
 }
 policy {
     shaper test {
         bandwidth 330mbit
         default {
             bandwidth 300mbit
             queue-type fair-queue
         }
     }
 }
[edit]
vyos@bsp-asbr2-cm#
hikari@mynas:~$ iperf3 -c 198.18.0.10 -t 100
Connecting to host 198.18.0.10, port 5201
[  5] local 10.96.4.101 port 49502 connected to 198.18.0.10 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  19.5 MBytes   164 Mbits/sec  2459   1.51 MBytes       
[  5]   1.00-2.00   sec  16.2 MBytes   136 Mbits/sec  1891   1.16 MBytes       
[  5]   2.00-3.00   sec  17.5 MBytes   147 Mbits/sec  660   1.13 MBytes       
[  5]   3.00-4.00   sec  17.5 MBytes   147 Mbits/sec  1263   1.22 MBytes       
[  5]   4.00-5.00   sec  16.2 MBytes   136 Mbits/sec  1423   1.20 MBytes       
[  5]   5.00-6.00   sec  17.5 MBytes   147 Mbits/sec  1561   1.21 MBytes       
[  5]   6.00-7.00   sec  17.5 MBytes   147 Mbits/sec  1588   1.25 MBytes       
[  5]   7.00-8.00   sec  17.5 MBytes   147 Mbits/sec  1616   1.27 MBytes       
[  5]   8.00-9.00   sec  17.5 MBytes   147 Mbits/sec  2112   1.28 MBytes       
[  5]   9.00-10.00  sec  17.5 MBytes   147 Mbits/sec  2206   1.31 MBytes       
[  5]  10.00-11.00  sec  12.5 MBytes   105 Mbits/sec  1133   1.18 MBytes       
^C[  5]  11.00-11.60  sec  10.0 MBytes   140 Mbits/sec  770   1.28 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-11.60  sec   197 MBytes   142 Mbits/sec  18682             sender
[  5]   0.00-11.60  sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
hikari@mynas:~$

Iperf3 result when I disabled this qos rule:

hikari@mynas:~$ iperf3 -c 198.18.0.10 -t 100
Connecting to host 198.18.0.10, port 5201
[  5] local 10.96.4.101 port 49762 connected to 198.18.0.10 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  35.8 MBytes   300 Mbits/sec    0   4.92 MBytes       
[  5]   1.00-2.00   sec  42.5 MBytes   357 Mbits/sec    1   4.92 MBytes       
[  5]   2.00-3.00   sec  42.5 MBytes   357 Mbits/sec    0   4.92 MBytes       
[  5]   3.00-4.00   sec  38.8 MBytes   325 Mbits/sec    0   4.92 MBytes       
[  5]   4.00-5.00   sec  45.0 MBytes   378 Mbits/sec    0   4.92 MBytes       
[  5]   5.00-6.00   sec  42.5 MBytes   357 Mbits/sec    0   4.92 MBytes       
[  5]   6.00-7.00   sec  42.5 MBytes   357 Mbits/sec    0   4.92 MBytes       
[  5]   7.00-8.00   sec  42.5 MBytes   357 Mbits/sec    0   4.92 MBytes       
[  5]   8.00-9.00   sec  42.5 MBytes   357 Mbits/sec    0   4.92 MBytes       
[  5]   9.00-10.00  sec  42.5 MBytes   357 Mbits/sec    0   4.92 MBytes       
[  5]  10.00-11.00  sec  32.5 MBytes   273 Mbits/sec    0   5.14 MBytes       
^C[  5]  11.00-11.30  sec  12.5 MBytes   353 Mbits/sec    0   5.14 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-11.30  sec   462 MBytes   343 Mbits/sec    1             sender
[  5]   0.00-11.30  sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated
hikari@mynas:~$

My hardware platform is Supermicro's X10SDV with Intel Xeon D1521 CPU, hypervisor configuration for this instance is 2vCPU+1GB of RAM.
Because the IPsec performance in normal setting is too poor and I changed kernel cmdline to this:

vyos@bsp-asbr2-cm:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/1.4-rolling-202302150317/vmlinuz boot=live rootdelay=5 noautologin net.ifnames=0 biosdevname=0 vyos-union=/boot/1.4-rolling-202302150317 console=ttyS0,115200 console=tty0 mitigations=off
vyos@bsp-asbr2-cm:~$

Btw, if I manually set shaper rule by hand, it works correctly:

sudo tc qdisc add root dev tun0 handle 1: htb default 2
sudo tc class add dev tun0 parent 1: classid 1:1 htb rate 330mbit
sudo tc class add dev tun0 parent 1:1 classid 1:2 htb rate 300mbit
sudo tc class add dev tun0 parent 1:1 classid 1:3 htb rate 320mbit

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202302150317
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

Try the latest rolling release

Still not quite right.

vpn@bsp-rasvpngw1:~$ iperf3 -c 192.168.14.2 -t 100
Connecting to host 192.168.14.2, port 5201
[  5] local 192.168.68.2 port 43574 connected to 192.168.14.2 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  27.3 MBytes   229 Mbits/sec    0   1.71 MBytes       
[  5]   1.00-2.00   sec  42.9 MBytes   360 Mbits/sec    0   1.71 MBytes       
[  5]   2.00-3.00   sec  41.8 MBytes   351 Mbits/sec    0   1.71 MBytes       
[  5]   3.00-4.00   sec  38.6 MBytes   324 Mbits/sec  194   1.29 MBytes       
[  5]   4.00-5.00   sec  41.0 MBytes   344 Mbits/sec    0   1.41 MBytes       
[  5]   5.00-6.00   sec  43.0 MBytes   361 Mbits/sec    0   1.50 MBytes       
[  5]   6.00-7.00   sec  37.2 MBytes   312 Mbits/sec   90   1.12 MBytes       
[  5]   7.00-8.00   sec  33.0 MBytes   277 Mbits/sec    1   1.18 MBytes       
[  5]   8.00-9.00   sec  36.1 MBytes   303 Mbits/sec    0   1.20 MBytes       
[  5]   9.00-10.00  sec  37.4 MBytes   314 Mbits/sec    0   1.22 MBytes       
[  5]  10.00-11.00  sec  38.5 MBytes   323 Mbits/sec    0   1.24 MBytes       
[  5]  11.00-12.00  sec  38.4 MBytes   322 Mbits/sec    0   1.26 MBytes       
[  5]  12.00-13.00  sec  38.5 MBytes   323 Mbits/sec    0   1.28 MBytes       
[  5]  13.00-14.00  sec  38.5 MBytes   323 Mbits/sec   85    932 KBytes       
[  5]  14.00-15.00  sec  29.2 MBytes   245 Mbits/sec    0   1.02 MBytes       
[  5]  15.00-16.00  sec  33.6 MBytes   282 Mbits/sec    0   1.12 MBytes       
[  5]  16.00-17.00  sec  36.1 MBytes   303 Mbits/sec    0   1.18 MBytes       
[  5]  17.00-18.00  sec  37.4 MBytes   313 Mbits/sec    0   1.23 MBytes       
[  5]  18.00-19.00  sec  37.4 MBytes   313 Mbits/sec    0   1.27 MBytes       
[  5]  19.00-20.00  sec  39.6 MBytes   332 Mbits/sec    0   1.29 MBytes       
[  5]  20.00-21.00  sec  39.9 MBytes   335 Mbits/sec    0   1.30 MBytes       
[  5]  21.00-22.00  sec  39.9 MBytes   334 Mbits/sec    0   1.30 MBytes       
[  5]  22.00-23.00  sec  38.6 MBytes   324 Mbits/sec    0   1.30 MBytes       
[  5]  23.00-24.00  sec  41.0 MBytes   344 Mbits/sec    0   1.30 MBytes       
[  5]  24.00-25.00  sec  36.2 MBytes   304 Mbits/sec    0   1.30 MBytes       
[  5]  25.00-26.00  sec  39.7 MBytes   333 Mbits/sec    0   1.31 MBytes       
[  5]  26.00-27.00  sec  39.9 MBytes   335 Mbits/sec    0   1.33 MBytes       
[  5]  27.00-28.00  sec  38.8 MBytes   326 Mbits/sec   15    388 KBytes       
[  5]  28.00-29.00  sec  28.4 MBytes   238 Mbits/sec   62   1.07 MBytes       
[  5]  29.00-30.00  sec  32.7 MBytes   274 Mbits/sec  252    700 KBytes        # when I apply the qos rule
[  5]  30.00-31.00  sec  2.44 MBytes  20.5 Mbits/sec  1227   38.6 KBytes       
[  5]  31.00-32.00  sec  2.32 MBytes  19.5 Mbits/sec   79   41.2 KBytes       
[  5]  32.00-33.00  sec  1.16 MBytes  9.73 Mbits/sec    0   63.8 KBytes       
[  5]  33.00-34.00  sec  1.16 MBytes  9.73 Mbits/sec    6   47.9 KBytes       
[  5]  34.00-35.00  sec  1.16 MBytes  9.73 Mbits/sec    8   34.6 KBytes       
[  5]  35.00-36.00  sec  1.16 MBytes  9.73 Mbits/sec    4   29.3 KBytes       
[  5]  36.00-37.00  sec  1.16 MBytes  9.73 Mbits/sec    4   34.6 KBytes       
[  5]  37.00-38.00  sec  1.16 MBytes  9.73 Mbits/sec    2   39.9 KBytes       
^C[  5]  38.00-38.46  sec  0.00 Bytes  0.00 bits/sec    5   23.9 KBytes
vyos@bsp-asbr2-cm# show qos
 policy {
     shaper test {
         bandwidth 330mbit
         default {
             bandwidth 300mbit
             queue-type fair-queue
         }
     }
 }
[edit]
vyos@bsp-asbr2-cm# set qos interface tun0 egress test
[edit]
vyos@bsp-asbr2-cm# commit
vyos@bsp-asbr2-cm# show qos
 interface tun0 {
     egress test
 }
 policy {
     shaper test {
         bandwidth 330mbit
         default {
>            bandwidth 90%
             queue-type fair-queue
         }
     }
 }
[edit]
vyos@bsp-asbr2-cm# 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:      2023-03-03 16:31:58
Image version:    VyOS 1.4-rolling-202303030317
Release train:    current

Built by:         [email protected]
Built on:         Fri 03 Mar 2023 03:17 UTC
Build UUID:       0ce89af1-6db9-4940-9ee6-6be3f1d7a079
Build commit ID:  afdaac1012d7b1

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware20,1
Hardware S/N:     VMware-56 4d fb 13 43 c4 e5 63-b0 9e 49 a8 b7 33 09 da
Hardware UUID:    13fb4d56-c443-63e5-b09e-49a8b73309da

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 255, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 246, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/trafficshaper.py", line 87, in update
    rate = self._rate_convert(config['default']['bandwidth'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 124, in _rate_convert
    speed = read_file(f'/sys/class/net/{self._interface}/speed')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 219, in read_file
    raise e
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 214, in read_file
    data = f.read().strip()
           ^^^^^^^^
OSError: [Errno 22] Invalid argument

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 eth4 parent ffff:'
returned (out):

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

returned (err):
Error: Cannot find specified qdisc on specified device.

[[qos]] failed
Commit failed
[edit]
vyos@bsp-asbr2-cm# 
vyos@bsp-asbr2-cm# set qos policy shaper test bandwidth auto
[edit]
vyos@bsp-asbr2-cm# 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:      2023-03-03 16:33:58
Image version:    VyOS 1.4-rolling-202303030317
Release train:    current

Built by:         [email protected]
Built on:         Fri 03 Mar 2023 03:17 UTC
Build UUID:       0ce89af1-6db9-4940-9ee6-6be3f1d7a079
Build commit ID:  afdaac1012d7b1

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware20,1
Hardware S/N:     VMware-56 4d fb 13 43 c4 e5 63-b0 9e 49 a8 b7 33 09 da
Hardware UUID:    13fb4d56-c443-63e5-b09e-49a8b73309da

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 255, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 246, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/trafficshaper.py", line 36, in update
    speed = self._rate_convert(config['bandwidth'])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 124, in _rate_convert
    speed = read_file(f'/sys/class/net/{self._interface}/speed')
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 219, in read_file
    raise e
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 214, in read_file
    data = f.read().strip()
           ^^^^^^^^
OSError: [Errno 22] Invalid argument

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 eth4 parent ffff:'
returned (out):

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

returned (err):
Error: Cannot delete qdisc with handle of zero.

[[qos]] failed
Commit failed
[edit]

I don't know why I set a 100mbit/s shaper, but result in lots of retry and 5~10mbit/s speed.

vyos@bsp-asbr2-cm# show qos
 interface tun0 {
     egress test
 }
 policy {
     shaper test {
         bandwidth 1gbit
         default {
             bandwidth 100mbit
             queue-type fair-queue
         }
     }
 }
[edit]
vyos@bsp-asbr2-cm#
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   803 KBytes  6.58 Mbits/sec   19   23.9 KBytes       
[  5]   1.00-2.00   sec   608 KBytes  4.98 Mbits/sec    5   25.3 KBytes       
[  5]   2.00-3.00   sec   564 KBytes  4.62 Mbits/sec    7   26.6 KBytes       
[  5]   3.00-4.00   sec   762 KBytes  6.24 Mbits/sec    2   26.6 KBytes       
[  5]   4.00-5.00   sec   968 KBytes  7.93 Mbits/sec    2   34.6 KBytes       
[  5]   5.00-6.00   sec   813 KBytes  6.66 Mbits/sec    5   21.3 KBytes       
[  5]   6.00-7.00   sec   842 KBytes  6.90 Mbits/sec    1   31.9 KBytes       
[  5]   7.00-8.00   sec  1.04 MBytes  8.75 Mbits/sec    2   38.6 KBytes       
[  5]   8.00-9.00   sec   789 KBytes  6.46 Mbits/sec    5   22.6 KBytes       
[  5]   9.00-10.00  sec   795 KBytes  6.52 Mbits/sec    6   22.6 KBytes       
[  5]  10.00-11.00  sec   805 KBytes  6.59 Mbits/sec    4   31.9 KBytes       
[  5]  11.00-12.00  sec   809 KBytes  6.62 Mbits/sec    2   34.6 KBytes       
[  5]  12.00-13.00  sec  1.02 MBytes  8.56 Mbits/sec    9   29.3 KBytes       
[  5]  13.00-14.00  sec   629 KBytes  5.15 Mbits/sec    3   22.6 KBytes       
[  5]  14.00-15.00  sec   563 KBytes  4.61 Mbits/sec    6   23.9 KBytes       
[  5]  15.00-16.00  sec   637 KBytes  5.22 Mbits/sec    3   29.3 KBytes       
[  5]  16.00-17.00  sec   714 KBytes  5.85 Mbits/sec    6   20.0 KBytes       
[  5]  17.00-18.00  sec   730 KBytes  5.98 Mbits/sec    2   20.0 KBytes       
[  5]  18.00-19.00  sec   732 KBytes  5.99 Mbits/sec    3   20.0 KBytes       
[  5]  19.00-20.00  sec   874 KBytes  7.16 Mbits/sec    1   30.6 KBytes       
[  5]  20.00-21.00  sec   734 KBytes  6.01 Mbits/sec    4   20.0 KBytes       
[  5]  21.00-22.00  sec   983 KBytes  8.05 Mbits/sec    1   29.3 KBytes       
[  5]  22.00-23.00  sec   673 KBytes  5.51 Mbits/sec    2   30.6 KBytes       
[  5]  23.00-24.00  sec   657 KBytes  5.38 Mbits/sec    3   22.6 KBytes       
[  5]  24.00-25.00  sec   733 KBytes  6.00 Mbits/sec    5   14.6 KBytes       
[  5]  25.00-26.00  sec   634 KBytes  5.20 Mbits/sec    1   25.3 KBytes       
[  5]  26.00-27.00  sec   509 KBytes  4.17 Mbits/sec    8   17.3 KBytes       
[  5]  27.00-28.00  sec   565 KBytes  4.63 Mbits/sec    3   20.0 KBytes       
[  5]  28.00-29.00  sec   697 KBytes  5.71 Mbits/sec    3   22.6 KBytes       
[  5]  29.00-30.00  sec   630 KBytes  5.16 Mbits/sec    7   23.9 KBytes       
[  5]  30.00-31.00  sec   661 KBytes  5.42 Mbits/sec    2   27.9 KBytes       
[  5]  31.00-32.00  sec   724 KBytes  5.93 Mbits/sec    8   18.6 KBytes       
[  5]  32.00-33.00  sec   567 KBytes  4.64 Mbits/sec    2   20.0 KBytes       
[  5]  33.00-34.00  sec   797 KBytes  6.53 Mbits/sec    1   33.3 KBytes       
[  5]  34.00-35.00  sec   750 KBytes  6.15 Mbits/sec    5   20.0 KBytes       
[  5]  35.00-36.00  sec   725 KBytes  5.94 Mbits/sec    5   21.3 KBytes       
[  5]  36.00-37.00  sec   664 KBytes  5.44 Mbits/sec    4   23.9 KBytes       
[  5]  37.00-38.00  sec   755 KBytes  6.19 Mbits/sec    2   25.3 KBytes       
[  5]  38.00-39.00  sec   751 KBytes  6.16 Mbits/sec    3   16.0 KBytes       
[  5]  39.00-40.00  sec   807 KBytes  6.61 Mbits/sec    0   35.9 KBytes       
[  5]  40.00-41.00  sec  1.14 MBytes  9.59 Mbits/sec    1   42.6 KBytes       
[  5]  41.00-42.00  sec  1.30 MBytes  10.9 Mbits/sec    6   33.3 KBytes       
[  5]  42.00-43.00  sec   734 KBytes  6.01 Mbits/sec   10   20.0 KBytes       
[  5]  43.00-44.00  sec   438 KBytes  3.58 Mbits/sec    4   17.3 KBytes       
[  5]  44.00-45.00  sec   563 KBytes  4.61 Mbits/sec    3   20.0 KBytes       
[  5]  45.00-46.00  sec   688 KBytes  5.63 Mbits/sec    2   21.3 KBytes       
[  5]  46.00-47.00  sec   696 KBytes  5.70 Mbits/sec    7   21.3 KBytes       
[  5]  47.00-48.00  sec   842 KBytes  6.90 Mbits/sec    4   18.6 KBytes       
[  5]  48.00-49.00  sec   688 KBytes  5.63 Mbits/sec    3   20.0 KBytes       
[  5]  49.00-50.00  sec   571 KBytes  4.67 Mbits/sec    7   16.0 KBytes       
[  5]  50.00-51.00  sec   625 KBytes  5.12 Mbits/sec    2   21.3 KBytes       
[  5]  51.00-52.00  sec   962 KBytes  7.88 Mbits/sec    0   42.6 KBytes       
[  5]  52.00-53.00  sec   956 KBytes  7.83 Mbits/sec    4   37.2 KBytes       
[  5]  53.00-54.00  sec   721 KBytes  5.91 Mbits/sec    6   26.6 KBytes       
[  5]  54.00-55.00  sec   625 KBytes  5.12 Mbits/sec    2   29.3 KBytes       
[  5]  55.00-56.00  sec  1014 KBytes  8.30 Mbits/sec    2   37.2 KBytes       
[  5]  56.00-57.00  sec   971 KBytes  7.95 Mbits/sec    7   33.3 KBytes       
[  5]  57.00-58.00  sec   870 KBytes  7.13 Mbits/sec    4   20.0 KBytes       
[  5]  58.00-59.00  sec   954 KBytes  7.81 Mbits/sec    0   42.6 KBytes       
[  5]  59.00-60.00  sec   907 KBytes  7.43 Mbits/sec    8   23.9 KBytes       
[  5]  60.00-61.00  sec   575 KBytes  4.71 Mbits/sec    7   18.6 KBytes       
[  5]  61.00-62.00  sec   625 KBytes  5.12 Mbits/sec    4   21.3 KBytes       
[  5]  62.00-63.00  sec   500 KBytes  4.10 Mbits/sec    4   23.9 KBytes       
[  5]  63.00-64.00  sec   628 KBytes  5.14 Mbits/sec    3   16.0 KBytes       
[  5]  64.00-65.00  sec   850 KBytes  6.96 Mbits/sec    0   38.6 KBytes       
[  5]  65.00-66.00  sec   777 KBytes  6.36 Mbits/sec   11   21.3 KBytes       
[  5]  66.00-67.00  sec   766 KBytes  6.28 Mbits/sec    0   34.6 KBytes       
[  5]  67.00-68.00  sec  1.15 MBytes  9.69 Mbits/sec    2   26.6 KBytes       
[  5]  68.00-69.00  sec   692 KBytes  5.67 Mbits/sec    5   21.3 KBytes       
[  5]  69.00-70.00  sec   625 KBytes  5.12 Mbits/sec    3   21.3 KBytes       
[  5]  70.00-71.00  sec   755 KBytes  6.19 Mbits/sec    3   27.9 KBytes       
[  5]  71.00-72.00  sec   697 KBytes  5.71 Mbits/sec    2   33.3 KBytes       
[  5]  72.00-73.00  sec  1.03 MBytes  8.67 Mbits/sec    7   30.6 KBytes       
[  5]  73.00-74.00  sec   654 KBytes  5.36 Mbits/sec   29   16.0 KBytes       
[  5]  74.00-75.00  sec   563 KBytes  4.61 Mbits/sec    2   18.6 KBytes       
[  5]  75.00-76.00  sec   626 KBytes  5.13 Mbits/sec    2   21.3 KBytes       
[  5]  76.00-77.00  sec   563 KBytes  4.61 Mbits/sec    8   14.6 KBytes       
[  5]  77.00-78.00  sec   563 KBytes  4.61 Mbits/sec    4   18.6 KBytes       
[  5]  78.00-79.00  sec   688 KBytes  5.63 Mbits/sec    1   29.3 KBytes       
[  5]  79.00-80.00  sec   781 KBytes  6.40 Mbits/sec    4   27.9 KBytes       
[  5]  80.00-81.00  sec   753 KBytes  6.17 Mbits/sec    2   25.3 KBytes       
^C[  5]  81.00-81.75  sec   563 KBytes  6.12 Mbits/sec    6   30.6 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-81.75  sec  59.9 MBytes  6.15 Mbits/sec  353             sender
[  5]   0.00-81.75  sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated

As I understand there no percent or auto and it now expects only rate, needs to check

vyos@r14# set qos policy shaper test default bandwidth
Possible completions:
   <number>             Bits per second
   <number>bit          Bits per second
   <number>kbit         Kilobits per second
   <number>mbit         Megabits per second
   <number>gbit         Gigabits per second
   <number>tbit         Terabits per second
   <number>

I don't know why when I set bandwidth from 10k-10mbit/s, the QoS shaper works correctly but when I set to 100mbit/s~600mbit/s, I only get fews of mbit/s or tens of mbit/s. When I set above about 800mbit/s it looks like no limitation at all. When I manually set limit by tc commands, it seems okay.

vyos@bsp-asbr2-cm# show qos
 interface tun0 {
     egress test
 }
 policy {
     shaper test {
         bandwidth 300mbit
         default {
             bandwidth 200mbit
             queue-type fair-queue
         }
     }
 }
[edit]
vyos@bsp-asbr2-cm# 
vyos@bsp-asbr2-cm:~$ sudo tc qdisc show
qdisc noqueue 0: dev lo root refcnt 2 
qdisc mq 0: dev eth0 root 
qdisc pfifo_fast 0: dev eth0 parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth0 parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc mq 0: dev eth1 root 
qdisc pfifo_fast 0: dev eth1 parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth1 parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc mq 0: dev eth3 root 
qdisc pfifo_fast 0: dev eth3 parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth3 parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc mq 0: dev eth4 root 
qdisc pfifo_fast 0: dev eth4 parent :2 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: dev eth4 parent :1 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc noqueue 0: dev cm_up root refcnt 2 
qdisc noqueue 0: dev experimental root refcnt 2 
qdisc noqueue 0: dev dum1 root refcnt 2 
qdisc noqueue 0: dev dum0 root refcnt 2 
qdisc htb 1: dev tun0 root refcnt 2 r2q 187 default 0x1 direct_packets_stat 0 direct_qlen 1000
qdisc sfq 8017: dev tun0 parent 1:1 limit 127p quantum 1428b depth 127 divisor 1024 
vyos@bsp-asbr2-cm:~$

Is that configuration allright?

As I understand there no percent or auto and it now expects only rate, needs to check

vyos@r14# set qos policy shaper test default bandwidth
Possible completions:
   <number>             Bits per second
   <number>bit          Bits per second
   <number>kbit         Kilobits per second
   <number>mbit         Megabits per second
   <number>gbit         Gigabits per second
   <number>tbit         Terabits per second
   <number>

My instance has this option.... So weird.

vyos@bsp-asbr2-cm# set qos policy shaper test bandwidth ?
Possible completions:
   auto                 Bandwidth matches interface speed (default)
   <number>             Bits per second
   <number>bit          Bits per second
   <number>kbit         Kilobits per second
   <number>mbit         Megabits per second
   <number>gbit         Gigabits per second
   <number>tbit         Terabits per second
   <number>%            Percentage of interface link speed
   300mbit              

      
[edit]
vyos@bsp-asbr2-cm# set qos policy shaper test bandwidth

FYI

Most of the match rules results in:

returned (err):
Illegal "match"
[[qos]] failed
Commit failed

I’ve tried to setup simplest config I can imagine to be successfully committed.
Here it is:

vyos@host# show qos
 interface eth3 {
     egress TEST
 }
 policy {
     shaper TEST {
         bandwidth 61mbit
         class 100 {
             bandwidth 12mbit
         }
         default {
             bandwidth 20mbit
         }
     }
 }

But if I try to add simple match like:

set qos policy shaper TEST class 100 match TESTMATCH ip protocol udp

so we have:

vyos@host# show qos policy shaper TEST 
 bandwidth 61mbit
 class 100 {
     bandwidth 12mbit
+    match TESTMATCH {
+        ip {
+            protocol udp
+        }
+    }
 }
 default {
     bandwidth 20mbit
 }

Then commit returns:

Built on:         Tue 21 Mar 2023 15:23 UTC
Build UUID:       6aff375b-d17f-412b-8ca5-c2243173e3e3
Build commit ID:  4eda689e1fbc52

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

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 271, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 260, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/trafficshaper.py", line 100, in update
    super().update(config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 266, in update
    self._cmd(filter_cmd)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 36, in _cmd
    return cmd(command)
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: tc filter replace dev eth3 parent 1: protocol all u32 match ip protocol udp 0xff action police rate 12000000 burst 15k flowid 1:64
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 wg01 parent ffff:'
returned (out):

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

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc filter replace dev eth3 parent 1: protocol all u32 match ip protocol udp 0xff action police rate 12000000 burst 15k flowid 1:64'
returned (out):

returned (err):
Illegal "match"

[[qos]] failed
Commit failed
[edit]

While with match rule as below commit goes well.

set qos policy shaper TEST class 100 match TESTMATCH mark 1024

On 1.4-rolling-202305080742, speed limit and protocol detection still not worked out correctly too.

vyos@bsp-asbr2-cm# show qos
 policy {
     shaper test {
         bandwidth auto
+        class 10 {
+            bandwidth 300mbit
+            match TCP {
+                ip {
+                    protocol tcp
+                }
+            }
+        }
         default {
>            bandwidth 1gbit
             queue-type priority
         }
     }
 }
[edit]
vyos@bsp-asbr2-cm# commit
[edit]
vyos@bsp-asbr2-cm# set qos interface tun
tun0  tun1  tun2  
[edit]
vyos@bsp-asbr2-cm# set qos interface tun0 
Possible completions:
   egress               Interface egress traffic policy
   ingress              Interface ingress traffic policy

      
[edit]
vyos@bsp-asbr2-cm# set qos interface tun0 egress 
Possible completions:
   <text>               QoS policy to use
   test                 

      
[edit]
vyos@bsp-asbr2-cm# set qos interface tun0 egress test
[edit]
vyos@bsp-asbr2-cm# 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:      2023-05-08 18:08:22
Image version:    VyOS 1.4-rolling-202305080742
Release train:    current

Built by:         [email protected]
Built on:         Mon 08 May 2023 07:42 UTC
Build UUID:       e37b349b-fd6a-4536-ba93-ac5341ec9bfb
Build commit ID:  a234c0cb6cfa2d

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

Hardware vendor:  VMware, Inc.
Hardware model:   VMware20,1
Hardware S/N:     VMware-56 4d fb 13 43 c4 e5 63-b0 9e 49 a8 b7 33 09 da
Hardware UUID:    13fb4d56-c443-63e5-b09e-49a8b73309da

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 271, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 260, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/trafficshaper.py", line 100, in update
    super().update(config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 266, in update
    self._cmd(filter_cmd)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 36, in _cmd
    return cmd(command)
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: tc filter replace dev tun0 parent 1: protocol all u32 match ip protocol tcp 0xff action police rate 300000000 burst 15k flowid 1:a
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 eth4 parent ffff:'
returned (out):

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc filter replace dev tun0 parent 1: protocol all u32 match ip protocol tcp 0xff action police rate 300000000 burst 15k flowid 1:a'
returned (out):

returned (err):
Illegal "match"

[[qos]] failed
Commit failed
[edit]
vyos@bsp-asbr2-cm#

It doesn't like protocol tcp

vyos@r14# sudo tc filter replace dev eth1 parent 1: protocol all u32 match ip protocol tcp 0xff action police rate 300000000 burst 15k flowid 1:a
Illegal "match"
[edit]
vyos@r14#

But it works with protocol 6

vyos@r14# sudo tc filter replace dev eth1 parent 1: protocol all u32 match ip protocol 6 0xff action police rate 300000000 burst 15k flowid 1:a
[edit]
vyos@r14#

And next fail:

ardware UUID:    4d6f4d29-1ae8-446f-8d2b-3decd9da64c7

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/qos.py", line 271, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/qos.py", line 260, in apply
    tmp.update(shaper_config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/trafficshaper.py", line 100, in update
    super().update(config, direction)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 272, in update
    self._build_base_qdisc(config['default'], default_cls_id)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 67, in _build_base_qdisc
    self._cmd(tmp)
  File "/usr/lib/python3/dist-packages/vyos/qos/base.py", line 36, in _cmd
    return cmd(command)
           ^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: tc qdisc replace dev eth1 parent 400b:1 pfifo limit None
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 eth1 parent ffff:'
returned (out):

returned (err):
Error: Cannot find specified qdisc on specified device.
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 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 eth4 parent ffff:'
returned (out):

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

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

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

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

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

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

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

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

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

returned (err):
Error: Cannot delete qdisc with handle of zero.
cmd 'tc qdisc replace dev eth1 parent 400b:1 pfifo limit None'
returned (out):

returned (err):
pfifo: Illegal value for "limit": "None"

[[qos]] failed
Commit failed
[edit]
Viacheslav renamed this task from QoS doesn't work correctly on 1.4-rolling-202302150317 to QoS doesn't work correctly root task.Jun 16 2023, 8:07 AM

It's time to separate this task into subtasks.

syncer changed the task status from Open to In progress.Aug 31 2023, 8:37 PM
syncer triaged this task as High priority.