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

FS#1602 - qos-scripts is broken after the change to UCI config parsing and callback handling #6551

Closed
openwrt-bot opened this issue Jun 21, 2018 · 9 comments
Labels

Comments

@openwrt-bot
Copy link

lantsem:

Problem was found and tested with WNDR3800 and WZR-HP-G300NH and 17.01 branch, but is common for all branches. Commit b6a1f43 indroduced in 17.01 broke the qos-scripts with default config file:

root@LEDE:~# qos-start
ip6tables v1.4.21: invalid port/service -m' specified Try ip6tables -h' or 'ip6tables --help' for more information.
ip6tables v1.4.21: invalid port/service -m' specified Try ip6tables -h' or 'ip6tables --help' for more information.
ip6tables v1.4.21: length: bad value for option "--length" near "-j", or out of range (0-65535).

Try ip6tables -h' or 'ip6tables --help' for more information. iptables v1.4.21: invalid port/service -m' specified
Try iptables -h' or 'iptables --help' for more information. iptables v1.4.21: invalid port/service -m' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.4.21: length: bad value for option "--length" near "-j", or out of range (0-65535).

Try `iptables -h' or 'iptables --help' for more information.

@openwrt-bot
Copy link
Author

guidosarducci:

Thanks for providing these details -- I'd heard of an issue but no one was providing specifics. The problem is that qos-scripts config parsing is fragile, and relies on some incorrect behaviour fixed in b6a1f43.

[[https://github.com//pull/1044|PR#1044]] fixes qos-scripts to be more robust and use documented config parsing, and works whether or not b6a1f43 is applied. Please try that and confirm.

@openwrt-bot
Copy link
Author

lantsem:

I tried patch from PR#1044. qos-start seems to work ok with or without b6a1f43, and with default config or my custom one. But qos-stat still broken with b6a1f43. I forgot to write about it in original report, my mistake.

qos-stat

/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
/usr/bin/qos-stat: eval: line 1: can't fork
...

@openwrt-bot
Copy link
Author

guidosarducci:

OK, thanks for confirming that my original fix worked.

I wasn't aware of qos-stat and don't use qos-scripts myself, so I appreciate your testing all this. I made a simple update to qos-stat in the PR, so please try [[https://github.com//pull/1044|PR#1044]] once more.

I'm also concluding most of the UCI callback usage in qos-scripts is not appropriate, and could be replaced with simper UCI reading. Would you mind testing another update with the standard/your custom config afterwards?

@openwrt-bot
Copy link
Author

lantsem:

qos-stat is fixed now. Works with or without b6a1f43.

I can test future updates, thanks for your efforts!

@openwrt-bot
Copy link
Author

guidosarducci:

Great, thanks for confirming that qos-stat works.

I've made one more update in [[https://github.com//pull/1044|PR#1044]] to remove unnecessary callbacks and simplify the config parsing. Would you mind reconfirming your earlier tests with qos-start and qos-stat? Thanks again.

@openwrt-bot
Copy link
Author

lantsem:

Tested 2d007e1. I don't see any updates to qos-stat script, so old results are still relevant. As for generate.sh - I see problem with setting some values from config file. It sets classgroup and upload speed as default values from script (128 and Default), ignoring the given values in config file.

@openwrt-bot
Copy link
Author

guidosarducci:

OK, I see the problem but didn't catch it because I'm testing with the default UCI config, which sets upload/classgroup to 128/Default. Thanks again for the catch.

It should be fixed now in the same PR.

@openwrt-bot
Copy link
Author

lantsem:

PR#1044 a28baab: all good now, with or without b6a1f43.

@openwrt-bot
Copy link
Author

guidosarducci:

Excellent news! The fix is now merged into the staging tree of @dedeckeh, so should appear in master sometime. Thanks for your help.

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

1 participant