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

Doesn't work with busybox #176

Open
topas-rec opened this issue Nov 23, 2023 · 1 comment
Open

Doesn't work with busybox #176

topas-rec opened this issue Nov 23, 2023 · 1 comment

Comments

@topas-rec
Copy link

topas-rec commented Nov 23, 2023

Describe the bug

Fetching command paths like for the ip command doesn't work on systems using busybox.

OpenWRT uses busybox which provides commands like ip for embedded Linux systems.

Expected behavior

Running tcset to create incoming rate shaping rules works even if the ip command is provided through busybox.

To Reproduce

Steps to reproduce the behavior:

  1. Install OpenWRT and busybox (and dependencies for tcconfig)
  2. Run tcset eth0 --direction incoming --rate 1Mbps
  3. Observe errors where tcconfic is calling /path/to/busybox link add dev ifbXXXX type ifb and fails with errors

Environments

Please execute the following command and past the output:

Removed, reason for this issue is already known and noted below.

Complete the following information:

  • Docker Version (if you using docker): no docker
  • Installation Method: 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 because tcconfig uses python subprocrunner.Which with following symlinks enabled.

See

bin_path = spr.Which(command, follow_symlinks=True)

It is used since 179fcaf.

The command ip is symlinked with busybox in OpenWRT.
When the symlink option of that command is set to False in a manual test the ip 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 through tcconfig, modify it and use that.
It would be nice if it works with busybox, too.
If yes, then the symlink option is in question.

@thombashi
Copy link
Owner

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.

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

No branches or pull requests

2 participants