Open topas-rec opened 9 months ago
Thank you for your report.
To check the capability permission, it is necessary to obtain the full path of the command entity. However, in certain environments, you may encounter problems like this issue. For such cases, we may better consider adding an option to skip obtaining the full path of the commands.
Describe the bug
Fetching command paths like for the
ip
command doesn't work on systems usingbusybox
.OpenWRT uses
busybox
which provides commands likeip
for embedded Linux systems.Expected behavior
Running
tcset
to create incoming rate shaping rules works even if theip
command is provided throughbusybox
.To Reproduce
Steps to reproduce the behavior:
tcset eth0 --direction incoming --rate 1Mbps
/path/to/busybox link add dev ifbXXXX type ifb
and fails with errorsEnvironments
Please execute the following command and past the output:
Removed, reason for this issue is already known and noted below.
Complete the following information:
pip
/deb package
Additional context
Add any other context (logs, error output, etc.) about the problem here.
The
ip
command path is not found on OpenWRT becausetcconfig
uses pythonsubprocrunner.Which
with following symlinks enabled.See https://github.com/thombashi/tcconfig/blob/e14f9fbdb235e2d6b2748962735dcf3fa1f356f3/tcconfig/_common.py#L45
It is used since https://github.com/thombashi/tcconfig/commit/179fcafb9fc4260289d0339f88de36c51e5b684a.
The command
ip
is symlinked withbusybox
in OpenWRT. When the symlink option of that command is set toFalse
in a manual test theip
command path (/path/to/ip
) can be fetched successfully.Was there a specific reason to enable symlinks here?
A workaround would be to generate a
tc
script throughtcconfig
, modify it and use that. It would be nice if it works withbusybox
, too. If yes, then the symlink option is in question.