You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to add multiple rules to limit bandwidth per ip but when I try to add one I've got an error.
This is similar to the issue #131 but it has been closed.
There the output on an interface without any rules, the first one execute well but the second one trigger the error, thank you for your help.
tcset wlo1 --rate 2Mbps --network 192.168.10.15/32
tcset wlo1 --rate 2Mbps --network 192.168.10.42/32 --add --debug
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - lsmod
DEBUG | simplesqlite.core:connect:266 - connect to a SQLite database: path=':memory:', mode=w
DEBUG | simplesqlite.core:create_table:1288 - CREATE TABLE IF NOT EXISTS 'filter' (device TEXT NOT NULL, "filter_id" TEXT, flowid TEXT, protocol TEXT, priority INTEGER, [src-network] TEXT, [dst-network] TEXT, [src-port] INTEGER, [dst-port] INTEGER, classid TEXT, handle INTEGER)
DEBUG | simplesqlite.core:create_table:1288 - CREATE TABLE IF NOT EXISTS 'qdisc' (device TEXT NOT NULL, "direct_qlen" INTEGER, parent TEXT, handle TEXT, delay TEXT, [delay-distro] TEXT, loss TEXT, duplicate TEXT, corrupt TEXT, reorder TEXT, rate TEXT)
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc filter show dev wlo1 root
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc class show dev wlo1
DEBUG | tcconfig.parser._class:parse:51 - parse a class entry: {'device': 'wlo1', 'classid': '120b:1', 'rate': '32Gbps'}
DEBUG | tcconfig.parser._class:parse:51 - parse a class entry: {'device': 'wlo1', 'classid': '120b:2', 'rate': '2Mbps'}
DEBUG | simplesqlite.core:__create_table_from_tabledata:1735 - __create_table_from_tabledata:
tbldata=table_name=class, headers=[device, classid, rate], cols=3, rows=2
DEBUG | tabledata.normalizer:normalize:53 - normalize: SQLiteTableDataSanitizer
DEBUG | dataproperty._extractor:to_dp_matrix:487 - max_workers=1, preprocessor=strip_str=None, replace_tabs_with_spaces=True, tab_length=2, line_break_handling=LineBreakHandling.NOP, line_break_repl= , escape_html_tag=False, escape_formula_injection=False
DEBUG | dataproperty._extractor:to_column_dp_list:420 - converting to column dataproperty:
DEBUG | dataproperty._extractor:to_column_dp_list:448 - params:
DEBUG | dataproperty._extractor:to_column_dp_list:448 - headers=3
DEBUG | dataproperty._extractor:to_column_dp_list:448 - prev_col_count=None
DEBUG | dataproperty._extractor:to_column_dp_list:448 - matrix_formatting=MatrixFormatting.TRIM
DEBUG | dataproperty._extractor:to_column_dp_list:448 - column_type_hints=()
DEBUG | dataproperty._extractor:to_column_dp_list:450 - results:
DEBUG | dataproperty._extractor:to_column_dp_list:481 - column=0, type=STRING, align=left, ascii_width=6
DEBUG | dataproperty._extractor:to_column_dp_list:481 - column=1, type=STRING, align=left, ascii_width=7
DEBUG | dataproperty._extractor:to_column_dp_list:481 - column=2, type=STRING, align=left, ascii_width=6
DEBUG | simplesqlite.core:create_table:1288 - CREATE TABLE IF NOT EXISTS 'class' (device TEXT, classid TEXT, rate TEXT)
DEBUG | simplesqlite.core:insert_many:618 - insert 2 records into class
DEBUG | simplesqlite.core:commit:1597 - commit: path=':memory:'
DEBUG | tcconfig.parser._class:parse:57 - tc class parse result: [
{
"device": "wlo1",
"classid": "120b:1",
"rate": "32Gbps"
},
{
"device": "wlo1",
"classid": "120b:2",
"rate": "2Mbps"
}
]
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc filter show dev wlo1
DEBUG | tcconfig.parser._filter:parse:92 - failed to parse mangle: filter parent 120b: protocol ip pref 5 u32 chain 0
DEBUG | tcconfig.parser._filter:parse:127 - failed to parse flow id: filter parent 120b: protocol ip pref 5 u32 chain 0
DEBUG | tcconfig.parser._filter:parse:137 - failed to parse filter: filter parent 120b: protocol ip pref 5 u32 chain 0
DEBUG | tcconfig.parser._filter:parse:92 - failed to parse mangle: filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800: ht divisor 1
DEBUG | tcconfig.parser._filter:parse:127 - failed to parse flow id: filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800: ht divisor 1
DEBUG | tcconfig.parser._filter:parse:137 - failed to parse filter: filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800: ht divisor 1
DEBUG | tcconfig.parser._filter:parse:92 - failed to parse mangle: filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 120b:2 not_in_hw
DEBUG | tcconfig.parser._filter:__parse_flow_id:184 - succeed to parse flow id: flow-id=120b:2, line=filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 120b:2 not_in_hw
DEBUG | tcconfig.parser._filter:__parse_protocol:189 - succeed to parse protocol: protocol=ip, line=filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 120b:2 not_in_hw
DEBUG | tcconfig.parser._filter:__parse_priority:196 - succeed to parse priority: priority=5, line=filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 120b:2 not_in_hw
DEBUG | tcconfig.parser._filter:__parse_filter_id:203 - succeed to parse filter id: filter-id=800::800, line=filter parent 120b: protocol ip pref 5 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 120b:2 not_in_hw
DEBUG | tcconfig.parser._filter:parse:92 - failed to parse mangle: match c0a80a0f/ffffffff at 16
DEBUG | tcconfig.parser._filter:parse:127 - failed to parse flow id: match c0a80a0f/ffffffff at 16
DEBUG | tcconfig.parser._filter:__parse_filter_ipv4:355 - succeed to parse ipv4 filter: src_network=None, dst_network=192.168.10.15/32, src_port=None, dst_port=None, line=match c0a80a0f/ffffffff at 16
DEBUG | tcconfig.parser._filter:parse:92 - failed to parse mangle: match 00000000/00000000 at 12
DEBUG | tcconfig.parser._filter:parse:127 - failed to parse flow id: match 00000000/00000000 at 12
DEBUG | tcconfig.parser._filter:__parse_filter_ipv4:355 - succeed to parse ipv4 filter: src_network=0.0.0.0/0, dst_network=192.168.10.15/32, src_port=None, dst_port=None, line=match 00000000/00000000 at 12
DEBUG | simplesqlite.core:insert_many:618 - insert 1 records into filter
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc qdisc show dev wlo1
DEBUG | tcconfig.parser._qdisc:parse:64 - parse a qdisc entry: {'direct_qlen': 1000, 'parent': '120b:2', 'device': 'wlo1', 'handle': '2791:'}
DEBUG | simplesqlite.core:insert_many:618 - insert 1 records into qdisc
DEBUG | simplesqlite.core:close:1621 - close connection to a SQLite database: path=':memory:'
DEBUG | simplesqlite.core:commit:1597 - commit: path=':memory:'
DEBUG | simplesqlite.core:connect:266 - connect to a SQLite database: path=':memory:', mode=w
DEBUG | simplesqlite.core:close:1621 - close connection to a SQLite database: path=':memory:'
DEBUG | simplesqlite.core:commit:1597 - commit: path=':memory:'
DEBUG | simplesqlite.core:create_table:1288 - CREATE TABLE IF NOT EXISTS 'filter' (device TEXT NOT NULL, "filter_id" TEXT, flowid TEXT, protocol TEXT, priority INTEGER, [src-network] TEXT, [dst-network] TEXT, [src-port] INTEGER, [dst-port] INTEGER, classid TEXT, handle INTEGER)
DEBUG | simplesqlite.core:close:1621 - close connection to a SQLite database: path=':memory:'
DEBUG | simplesqlite.core:commit:1597 - commit: path=':memory:'
DEBUG | simplesqlite.core:create_table:1288 - CREATE TABLE IF NOT EXISTS 'qdisc' (device TEXT NOT NULL, "direct_qlen" INTEGER, parent TEXT, handle TEXT, delay TEXT, [delay-distro] TEXT, loss TEXT, duplicate TEXT, corrupt TEXT, reorder TEXT, rate TEXT)
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc filter show dev wlo1 root
DEBUG | tcconfig._common:logging_context:27 - |---- start: _make_qdisc -----
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc qdisc add dev wlo1 root handle 120b: htb default 1
ERROR | tcconfig._common:run_command_helper:145 - command execution failed
command=/usr/sbin/tc qdisc add dev wlo1 root handle 120b: htb default 1
stderr=Error: Exclusivity flag on, cannot modify.
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc class add dev wlo1 parent 120b: classid 120b:1 htb rate 32000000.0kbit
DEBUG | tcconfig._common:logging_context:31 - ----- complete: _make_qdisc ----|
DEBUG | tcconfig._common:logging_context:27 - |---- start: _add_rate -----
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc class show dev wlo1
DEBUG | tcconfig.shaper.htb:__get_unique_qdisc_minor_id:253 - existing class list with dev wlo1: ['class htb 120b:1', 'class htb 120b:2']
DEBUG | tcconfig.shaper.htb:__get_unique_qdisc_minor_id:254 - existing minor classid list with dev wlo1: [1, 2]
DEBUG | tcconfig.shaper.htb:_get_qdisc_minor_id:43 - __get_unique_qdisc_minor_id: 3
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc class add dev wlo1 parent 120b: classid 120b:3 htb rate 2000.0Kbit ceil 2000.0Kbit burst 250.0KB cburst 250.0KB
DEBUG | tcconfig._common:logging_context:31 - ----- complete: _add_rate ----|
DEBUG | tcconfig._common:logging_context:27 - |---- start: _set_netem -----
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc qdisc show dev wlo1
DEBUG | tcconfig.shaper.htb:__extract_exist_netem_major_ids:274 - existing netem list with dev wlo1: ['qdisc htb 120b', 'qdisc netem 2791']
DEBUG | tcconfig.shaper.htb:__get_unique_netem_major_id:285 - existing netem major id list with dev wlo1: [4619, 10129]
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc qdisc add dev wlo1 parent 120b:3 handle 2792: netem
DEBUG | tcconfig._common:logging_context:31 - ----- complete: _set_netem ----|
DEBUG | tcconfig._common:logging_context:27 - |---- start: _add_exclude_filter -----
DEBUG | tcconfig.shaper.htb:_add_exclude_filter:154 - no exclude filter found
DEBUG | tcconfig._common:logging_context:31 - ----- complete: _add_exclude_filter ----|
DEBUG | tcconfig._common:logging_context:27 - |---- start: _add_filter -----
DEBUG | subprocrunner._subprocess_runner:__debug_print_command:323 - /usr/sbin/tc filter add dev wlo1 protocol ip parent 120b: prio 5 u32 match ip dst 192.168.10.42/32 match ip src 0.0.0.0/0 flowid 120b:3
DEBUG | tcconfig._common:logging_context:31 - ----- complete: _add_filter ----|
DEBUG | simplesqlite.core:close:1621 - close connection to a SQLite database: path=':memory:'
DEBUG | simplesqlite.core:commit:1597 - commit: path=':memory:'
DEBUG | tcconfig._main:_dump_history:75 - command history
/usr/sbin/tc qdisc add dev wlo1 root handle 120b: htb default 1
/usr/sbin/tc class add dev wlo1 parent 120b: classid 120b:1 htb rate 32000000.0kbit
/usr/sbin/tc class add dev wlo1 parent 120b: classid 120b:3 htb rate 2000.0Kbit ceil 2000.0Kbit burst 250.0KB cburst 250.0KB
/usr/sbin/tc qdisc add dev wlo1 parent 120b:3 handle 2792: netem
/usr/sbin/tc filter add dev wlo1 protocol ip parent 120b: prio 5 u32 match ip dst 192.168.10.42/32 match ip src 0.0.0.0/0 flowid 120b:3
Environments
Module
Version
uname
Linux 5.18.0-2-amd64
Python
CPython 3.10.5
platform
Debian GNU/Linux testing
tcconfig
0.27.1
docker
5.0.3
SimpleSQLite
1.3.0
Installation Method: pip
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to add multiple rules to limit bandwidth per ip but when I try to add one I've got an error.
This is similar to the issue #131 but it has been closed.
There the output on an interface without any rules, the first one execute well but the second one trigger the error, thank you for your help.
Environments
pip
The text was updated successfully, but these errors were encountered: