Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcdel not working properly and can't create rule after delete #153

Open
tgotthard opened this issue Oct 13, 2020 · 1 comment
Open

tcdel not working properly and can't create rule after delete #153

tgotthard opened this issue Oct 13, 2020 · 1 comment
Labels

Comments

@tgotthard
Copy link

tgotthard commented Oct 13, 2020

Describe the bug

A clear and concise description of what the bug is.

Creating a limitation is successful then I delete the rule with the id and want afterwards create a rule again fails with following output:
tcset p2p4 --rate 480000000bps --direction incoming
[WARNING] failed to add ip link: ip link already exists. try to execute with:
(a) --overwrite option if you want to overwrite the existing rule.
(b) --add option if you want to add a new rule in addition to the existing rules.
(c) --change option if you want to change the existing rule parameter.
[WARNING] failed to '/usr/sbin/tc qdisc add': ingress qdisc already exists. try to execute with:
(a) --overwrite option if you want to overwrite the existing rule.
(b) --add option if you want to add a new rule in addition to the existing rules.
(c) --change option if you want to change the existing rule parameter.
[WARNING] failed to '/usr/sbin/tc qdisc add': qdisc already exists (dev ifb5899, handle=170b:, algo=htb). try to execute with:
(a) --overwrite option if you want to overwrite the existing rule.
(b) --add option if you want to add a new rule in addition to the existing rules.
(c) --change option if you want to change the existing rule parameter.

Expected behavior

A clear and concise description of what you expected to happen.

the second add command should be possible, because tcshow is showing:
{
"p2p4": {
"outgoing": {},
"incoming": {}
}
}

To Reproduce

Steps to reproduce the behavior:

  1. tcset p2p4 --rate 480000000bps --direction incoming
  2. tcdel p2p4 --id 800::800 --direction incoming
  3. tcset p2p4 --rate 480000000bps --direction incoming

Environments

Please execute the following command and past the output:

Environment: Centos 7 (2003)
Kernel: Linux 3.10.0-1127.19.1.el7.x86_64
tcconfig: 0.26.0

  • uname: Linux juststore-dev 3.10.0-1127.19.1.el7.x86_64 x86_64
  • CPython version: 3.6.8
  • tcconfig version: 0.26.0
  • docker version: 4.3.1
  • SimpleSQLite version: 1.1.3

and complete the following information:

  • Installation Method: pip3

Additional context

Add any other context (logs, error output, etc.) about the problem here.

tcset p2p4 --rate 480000000bps --direction incoming
tcshow
usage: tcshow [-h] [-V] [--tc-command | --tc-script] [--debug | --quiet]
[--debug-query] [--stacktrace] [--ipv6] [--docker] [--color]
[--export EXPORT_PATH] [--exclude-filter-id]
[--dump-db DUMP_DB_PATH]
device [device ...]
tcshow: error: the following arguments are required: device
tcshow p2p4
{
"p2p4": {
"outgoing": {},
"incoming": {
"protocol=ip": {
"filter_id": "800::800",
"rate": "480Mbps"
}
}
}
}
tcdel p2p4 --id 800::800 --direction incoming
[INFO] delete a shaping rule: {'device': 'ifb5899', 'filter_id': '800::800', 'flowid': '170b:2', 'protocol': 'ip', 'priority': 5, 'src-network': '0.0.0.0/0', 'dst-network': '0.0.0.0/0'}

tcshow p2p4
{
"p2p4": {
"outgoing": {},
"incoming": {}
}
}

tcset p2p4 --rate 480000000bps --direction incoming
[WARNING] failed to add ip link: ip link already exists. try to execute with:
(a) --overwrite option if you want to overwrite the existing rule.
(b) --add option if you want to add a new rule in addition to the existing rules.
(c) --change option if you want to change the existing rule parameter.
[WARNING] failed to '/usr/sbin/tc qdisc add': ingress qdisc already exists. try to execute with:
(a) --overwrite option if you want to overwrite the existing rule.
(b) --add option if you want to add a new rule in addition to the existing rules.
(c) --change option if you want to change the existing rule parameter.
[WARNING] failed to '/usr/sbin/tc qdisc add': qdisc already exists (dev ifb5899, handle=170b:, algo=htb). try to execute with:
(a) --overwrite option if you want to overwrite the existing rule.
(b) --add option if you want to add a new rule in addition to the existing rules.
(c) --change option if you want to change the existing rule parameter.

@Yaocool
Copy link

Yaocool commented Aug 24, 2022

Any news on the fix? bug still exists @thombashi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants