-
Notifications
You must be signed in to change notification settings - Fork 395
T7965: reapply the QoS policy when the interface reconnect #4816
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
Conversation
|
❌ |
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
c-po
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File is named 99-vyos-ppp-qos and thus executed prior to 99-vyos-pppoe-callback - please rename it to 99-vyos-pppoe-qos
|
@c-po I have renamed the file name |
c-po
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the file permissions to be executable.
Call QoS CLI helper script when PPPoE interface reconnected and QoS was configured on interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-apply QoS config for PPP interface
I have not tested it
| # Check if QoS is configured for the interface | ||
| qos_path = ['qos', 'interface', interface] | ||
| if conf.exists(qos_path): | ||
| call('/usr/libexec/vyos/conf_mode/qos.py') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looping in @jestabro - Do you think this is the best way to call the conf script from here?
jestabro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not considered for merge as is, for performance reasons: (1) at the very least, it should not be a python script (2) revisit other approaches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @opswill,
after an internal review with all sub-teams, I need to withdraw my initial approval of this PR. While your solution works nicely for client connections, it poses serious scalability issues when VyOS operates as a BRAS.
The main concern is that this helper is implemented in Python. Each time a PPP interface is created by the kernel - which includes both PPPoE client interfaces and PPP subscriber interfaces when VyOS acts as a BRAS - the system incurs the Python interpreter startup overhead.
To put this in perspective: assuming a Python interpreter startup time of around one second, a scenario with 1000 subscribers connecting over 60 seconds would add roughly 1000 seconds of cumulative overhead. That translates to the control plane being overloaded just handling connection events, severely impacting performance and subscriber experience.
When @jestabro mentioned “other approaches,” he was referring to a possible short-term mitigation: implementing this helper as a Bash script instead. The script could quickly exit if the interface name does not start with pppoe, so PPP subscriber interfaces would only incur the lightweight Bash startup penalty, avoiding the heavy Python startup cost.
In the longer term, @jestabro and I have discussed the idea of developing a vyos-netlinkd daemon. Such a background daemon could listen for NETLINK messages from the kernel and handle interface creation events efficiently. Since the Python interpreter would already be running, the overhead per event would be negligible. The issue you’re addressing here would be a strong use case for that daemon approach.
I hope this clarifies the reasoning behind our change of stance. It would be great if you could adapt this helper into a shell script that conditionally calls the Python helper only when the interface name begins with pppoe. That would provide an immediate fix and keep the design future-proof for when vyos-netlinkd becomes available.
|
CI integration 👍 passed! Details
|
|
Hi @c-po My primary intent was simply to fix the specific problem of lost QoS configuration, and I agree that the hook script approach may not be the optimal long-term solution. I also noticed that there are already several other Python scripts present in /etc/ppp/ip-up.d/. Based on my understanding, all scripts in this directory will execute upon PPP dial/reconnect, meaning they likely also contribute to the existing performance overhead. To implement the short-term mitigation you suggested, I have submitted another PR #4837 to use a Bash script to conditionally call the Python helper, which should significantly improve performance in the interim. I look forward to your team's final solution with the vyos-netlinkd daemon. |
Change summary
pppoe interfaces may lose QoS config on reconnect. This PR reapplies the QoS policy when the interface comes up.
Types of changes
Related Task(s)
https://vyos.dev/T7965
Related PR(s)
How to test / Smoketest result
After the server-side disconnection,and when the pppoe0 link is up:
Checklist: