Page MenuHomeVyOS Platform

There isn't a way to remove the only rule from the (traffic-policy) class.
Closed, ResolvedPublicBUG

Description

There isn't a way to remove the only rule from the (traffic-policy) class.

Fore example:
We have the config.

set interfaces ethernet eth2 traffic-policy out MY-HTB
set traffic-policy shaper MY-HTB bandwidth '10mbit'
set traffic-policy shaper MY-HTB class 30 bandwidth '10%'
set traffic-policy shaper MY-HTB class 30 ceiling '50%'
set traffic-policy shaper MY-HTB class 30 match ADDRESS30 ip source address '10.1.1.0/24'
set traffic-policy shaper MY-HTB class 30 priority '5'
set traffic-policy shaper MY-HTB class 30 queue-type 'fair-queue'

It is not possible to remove an address from a class using the command:
del traffic-policy shaper MY-HTB class 30 match ADDRESS30 ip dscp/source/...

vyos@vyos# del traffic-policy shaper MY-HTB class 30 match ADDRESS30 ip source address '10.1.1.0/24'
[edit]
vyos@vyos# commit
[ traffic-policy shaper MY-HTB ]
Error: cls_u32: Selector not specified.
We have an error talking to the kernel
Command failed -:7
TC command failed. at /opt/vyatta/sbin/vyatta-qos.pl line 236.
qdisc add dev eth2 root handle 1: htb r2q 10 default 29
class add dev eth2 parent 1: classid 1:1 htb rate 10000000
class add dev eth2 parent 1:1 classid 1:29 htb rate 1000000 ceil 10000000 burst 15k prio 7
qdisc add dev eth2 parent 1:29 sfq
class add dev eth2 parent 1:1 classid 1:1e htb rate 1000000 ceil 5000000 burst 15k prio 5
qdisc add dev eth2 parent 1:1e sfq
filter add dev eth2 parent 1: prio 1 protocol all u32 flowid 1:1e
class add dev eth2 parent 1:1 classid 1:28 htb rate 9000000 ceil 10000000 burst 15k prio 5
qdisc add dev eth2 parent 1:28 sfq
filter add dev eth2 parent 1: prio 2 protocol all u32 flowid 1:28

[[traffic-policy]] failed
Commit failed
[edit]

It'll work well if we use these commands :
del traffic-policy shaper MY-HTB class 30 match ADDRESS30
del traffic-policy shaper MY-HTB class 30 match ADDRESS30 ip

vyos@vyos# del traffic-policy shaper MY-HTB class 30 match ADDRESS30 ip
[edit]
vyos@vyos# commit
[edit]

If we have more than one rule we have the following situation:

set interfaces ethernet eth2 traffic-policy out MY-HTB
set traffic-policy shaper MY-HTB class 40 bandwidth '90%'
set traffic-policy shaper MY-HTB class 40 ceiling '100%'
set traffic-policy shaper MY-HTB class 40 match ADDRESS40 ip source address '10.2.1.0/24'
set traffic-policy shaper MY-HTB class 40 match ADDRESS40 ip dscp CS4
set traffic-policy shaper MY-HTB class 40 priority '5'
set traffic-policy shaper MY-HTB class 40 queue-type 'fair-queue'

vyos@vyos# del traffic-policy shaper MY-HTB class 40 match ADDRESS40 ip source address '10.2.1.0/24'
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# del traffic-policy shaper MY-HTB class 40 match ADDRESS40 ip dscp CS4
[edit]
vyos@vyos# commit
[ traffic-policy shaper MY-HTB ]
Error: cls_u32: Selector not specified.
We have an error talking to the kernel
Command failed -:9
TC command failed. at /opt/vyatta/sbin/vyatta-qos.pl line 236.
qdisc add dev eth2 root handle 1: htb r2q 10 default 29
class add dev eth2 parent 1: classid 1:1 htb rate 10000000
class add dev eth2 parent 1:1 classid 1:29 htb rate 1000000 ceil 10000000 burst 15k prio 7
qdisc add dev eth2 parent 1:29 sfq
class add dev eth2 parent 1:1 classid 1:1e htb rate 1000000 ceil 5000000 burst 15k prio 5
qdisc add dev eth2 parent 1:1e sfq
class add dev eth2 parent 1:1 classid 1:28 htb rate 9000000 ceil 10000000 burst 15k prio 5
qdisc add dev eth2 parent 1:28 sfq
filter add dev eth2 parent 1: prio 2 protocol all u32 flowid 1:28

[[traffic-policy]] failed
Commit failed
[edit]

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.4-rolling-202201041316
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

Unknown Object (User) created this task.Feb 16 2022, 1:10 AM
Unknown Object (User) triaged this task as Low priority.
Unknown Object (User) created this object in space S1 VyOS Public.
Viacheslav changed the subtype of this task from "Task" to "Bug".Feb 16 2022, 7:08 AM
dmbaturin changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.