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

Traceback when using tcset with --change #85

Closed
selimt opened this issue Aug 18, 2017 · 6 comments
Closed

Traceback when using tcset with --change #85

selimt opened this issue Aug 18, 2017 · 6 comments
Assignees
Labels

Comments

@selimt
Copy link

selimt commented Aug 18, 2017

To reproduce:

tcdel -d eth0
tcset --device eth0 --rate 10M --src-network 172.17.0.2 --direction outgoing
tcset --device eth0 --rate 100M --src-network 172.17.0.2 --direction outgoing --change

Output:

[DEBUG] subprocrunner: tc qdisc show dev eth0
Traceback (most recent call last):
  File "/usr/local/bin/tcset", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/tcconfig/tcset.py", line 432, in main
    return_code = tc.set_tc()
  File "/usr/local/lib/python3.6/site-packages/tcconfig/traffic_control.py", line 348, in set_tc
    return self.__shaper.set_shaping()
  File "/usr/local/lib/python3.6/site-packages/tcconfig/shaper/htb.py", line 211, in set_shaping
    self._set_netem()
  File "/usr/local/lib/python3.6/site-packages/tcconfig/shaper/_interface.py", line 91, in _set_netem
    "handle {:s}".format(handle),
ValueError: Unknown format code 's' for object of type 'int'

tcconfig version is 0.13.2
Although the traceback is produced the change still takes effect.

Thanks

@thombashi thombashi self-assigned this Aug 19, 2017
@thombashi
Copy link
Owner

@selimt
Thank you for your report.

The problem was fixed in the latest version (0.14.0).
Please upgrade tcconfig (pip install tcconfig --upgrade) and re-execute the commands.

@selimt
Copy link
Author

selimt commented Aug 19, 2017

Thank you!

@selimt
Copy link
Author

selimt commented Aug 19, 2017

Hmm, I am still seeing the problem with 0.14.0:

root@1d0040e72239:/opt/shaper# tcset --version
tcset 0.14.0
root@1d0040e72239:/opt/shaper# tcset --device eth0 --rate 10M --direction outgoing --change
Traceback (most recent call last):
  File "/usr/local/bin/tcset", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/tcconfig/tcset.py", line 407, in main
    return_code = tc.set_tc()
  File "/usr/local/lib/python3.6/site-packages/tcconfig/traffic_control.py", line 352, in set_tc
    return self.__shaper.set_shaping()
  File "/usr/local/lib/python3.6/site-packages/tcconfig/shaper/htb.py", line 211, in set_shaping
    self._set_netem()
  File "/usr/local/lib/python3.6/site-packages/tcconfig/shaper/_interface.py", line 91, in _set_netem
    "handle {:s}".format(handle),
ValueError: Unknown format code 's' for object of type 'int'

@selimt selimt changed the title Traceback when using tccset with --change Traceback when using tcset with --change Aug 19, 2017
@thombashi
Copy link
Owner

@selimt
Sorry, I have misunderstood the problem.
Now, I believe the problem fixed in tsconfig 0.14.1.
Could you try this version?

@thombashi thombashi added the bug label Aug 19, 2017
@dastergon
Copy link
Contributor

I can confirm that it works with the latest tcconfig version

@thombashi
Copy link
Owner

@dastergon
Thank you for confirmation.

@selimt
I'll close the issue for now.
Feel free to reopen.

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