Conditioning not taking effect
I have a Raspberry Pi 3 (built-in wifi), and I've gotten as far as configuring it as an access point, running the PiNC service, and looking at the web interface.
However, when I actually enable throttling for a connected device, it doesn't seem to have any effect. The connection quality from the target device appears the same. In the PiNC web interface, the throttling icon is shown next to the device, but when I refresh the page, the icon goes away and the device is no longer shown as throttled.
OK. I spent an hour setting up a Debian Stretch VM in the same way I'd set up a Raspberry Pi. Here are my notes:
Symptoms
- The
setupscript isn't creating the traffic control queueing disciplines. - Conditioning traffic for a device isn't persisting on the web UI.
Cause
In a31e0a8b, I replaced testing Boolean(process.env.NO_EXEC) with process.env.NODE_ENV !== 'prod') in the ./src/server/exec module. Previously, if the NO_EXEC environment variable //wasn't// set, then PiNC would execute all commands. Now, if the NODE_ENV variable isn't set then PiNC won't execute all commands. Since the setup script wasn't updated to reflect this change, it's been broken (a NOP) since that change.
Now, if there aren't any traffic control queueing disciplines, then conditioning traffic for a device via the web UI should fail. Either:
- ~~The service isn't failing; or~~
- The service is failing but silently; or
- ~~The service is failing loudly but the web UI isn't reflecting that failure.~~
Related Issues
- It's impossible to debug the service (part of which backs the
setupscript). - The
setupscript fails to create the traffic control queueing disciplines for the "3G (UK)" profile.
- The service is failing loudly but the web UI isn't reflecting that failure.
I've just tested this locally and it can't happen. If the server returns a 4xx or 5xx error code, then the web UI doesn't update.
- The service isn't failing; or
I've just tested this locally and it isn't the case.
- The setup script fails to create the traffic control queueing disciplines for the "3G (UK)" profile.
This is because handles aren't being converted to hex in src/server/profiles.js.
@dbrant: I'd appreciate if you could retry this with PiNC@5ef8b1d.
Retrying from that commit, it looks like the throttle setting is being correctly persisted in the web UI. However, it still doesn't seem like any client connections are actually being throttled. The only error message I can see is the following from the setup script:
RTNETLINK answers: No such file or directory
(I'm not sure where else to look for additional debugging.)