Page MenuHomeVyOS Platform

QoS expects protocol number but not protocol name
Closed, ResolvedPublicBUG

Description

**: After I reverted to 1.3.2 LTS the QOS related issue was resolved.
vyos@vyos:~$ show queueing ethernet eth4

eth4 Queueing:
Class Policy Sent Dropped Overlimit Backlog
root shaper 1250914084 25 880565 0
10 fq-codel 33897 0 0 0
20 fq-codel 0 0 0 0
21 fq-codel 1250880187 25 0 0

Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

A configuration example to reproduce the problem:

set qos policy shaper EGRESS_QOS bandwidth 500mbit
set qos policy shaper EGRESS_QOS default bandwidth 70%
set qos policy shaper EGRESS_QOS default burst 2kb
set qos policy shaper EGRESS_QOS default ceiling 100%
set qos policy shaper EGRESS_QOS default priority 3
set qos policy shaper EGRESS_QOS default queue-type fq-codel

During the commit process, I encountered the error below:

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-06-02 19:07:50
Image version:    VyOS 1.4-rolling-202304301915
Release train:    current

Built by:         [email protected]
Built on:         Sun 30 Apr 2023 19:15 UTC
Build UUID:       d083199d-21dc-47da-9098-4627e87b6dbe
Build commit ID:  88be901bc103d1

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Sophos
Hardware model:   XG
Hardware S/N:     C0909FWBFWPM288
Hardware UUID:    03000200-0400-0500-0006-000700080009

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 eth4 par                                                                                                                                           ent 1: prio 5 protocol all u32 match ip sport 53 0xffff u32 match ip protocol ic                                                                                                                                           mp 0xff action police rate 100000000 burst 2kb 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 eth1 parent ffff:'
returned (out):

returned (err):
Error: Cannot delete qdisc with handle of zero.
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 wlan0 parent ffff:'
returned (out):

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

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

returned (err):
Error: Cannot find specified qdisc on specified device.
cmd 'tc qdisc del dev pppoe0 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 filter replace dev eth4 parent 1: prio 5 protocol all u32 match ip sport                                                                                                                                            53 0xffff u32 match ip protocol icmp 0xff action police rate 100000000 burst 2k                                                                                                                                           b flowid 1:a'
returned (out):

returned (err):
What is "u32"?
Usage: ... u32 [ match SELECTOR ... ] [ link HTID ] [ classid CLASSID ]
               [ action ACTION_SPEC ] [ offset OFFSET_SPEC ]
               [ ht HTID ] [ hashkey HASHKEY_SPEC ]
               [ sample SAMPLE ] [skip_hw | skip_sw]
or         u32 divisor DIVISOR

Where: SELECTOR := SAMPLE SAMPLE ...
       SAMPLE := { ip | ip6 | udp | tcp | icmp | u{32|16|8} | mark }
                 SAMPLE_ARGS [ divisor DIVISOR ]
       FILTERID := X:Y:Z

NOTE: CLASSID is parsed at hexadecimal input.

[[qos]] failed
Commit failed
Warning: you have uncommitted changes that will not be saved.

Details

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

cuongdt1994 renamed this task from Quality of Services cannot commit to QOS crash and cannot commit.Jun 2 2023, 7:17 PM
cuongdt1994 created this task.
cuongdt1994 renamed this task from QOS crash and cannot commit to Quality of Services crash with new qos policy.Jun 3 2023, 11:05 AM
cuongdt1994 updated the task description. (Show Details)
cuongdt1994 updated the task description. (Show Details)

Could you please try the configuration in the latest rolling release.

This comment was removed by cuongdt1994.

Found the problem with command:

set qos policy shaper EGRESS_QOS class 10 match icmp ip protocol icmp

will show error below:

Error: Cannot find specified qdisc on specified device.
cmd 'tc filter replace dev pppoe0 parent 1: prio 5 protocol all u32 match ip spo                                                                          rt 53 0xffff u32 match ip protocol icmp 0xff action police rate 10000000 burst 2                                                                          kb flowid 1:a'
returned (out):

returned (err):
What is "u32"?
Usage: ... u32 [ match SELECTOR ... ] [ link HTID ] [ classid CLASSID ]
               [ action ACTION_SPEC ] [ offset OFFSET_SPEC ]
               [ ht HTID ] [ hashkey HASHKEY_SPEC ]
               [ sample SAMPLE ] [skip_hw | skip_sw]
or         u32 divisor DIVISOR

Where: SELECTOR := SAMPLE SAMPLE ...
       SAMPLE := { ip | ip6 | udp | tcp | icmp | u{32|16|8} | mark }
                 SAMPLE_ARGS [ divisor DIVISOR ]
       FILTERID := X:Y:Z

NOTE: CLASSID is parsed at hexadecimal input.

It expects ip protocol 1 instead of 'ip protocol icmp' in tc
wrong generation for protocols

so we get

tc filter replace dev eth0 parent 1: protocol all u32 match ip sport 53 0xffff match ip protocol icmp 0xff flowid 1:17

expected:

tc filter replace dev eth0 parent 1: prio 1 protocol all u32 match ip protocol 1 0xff match ip sport 53 0xffff flowid 1:17
Viacheslav renamed this task from Quality of Services crash with new qos policy to QoS expects protocal number but not protocol name.Jun 17 2023, 1:19 PM
Viacheslav renamed this task from QoS expects protocal number but not protocol name to QoS expects protocol number but not protocol name.
Viacheslav changed the task status from Open to In progress.Jun 17 2023, 2:06 PM
Viacheslav claimed this task.
Viacheslav changed the task status from In progress to Needs testing.Jun 18 2023, 5:40 AM
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.