On start, the "build_rust.sh" script checks for the availability
of bpftool, pkg-config and clang/LLVM. If these aren't found, it
fires up an "apt-get install" for the appropriate packages.
into running files to avoid service interruption. The script
detects if you are using systemd (with the default names) and
will restart the services at the end of the process - for a
very brief interruption rather than several minutes.
Also suppresses pushd/popd output.
Related to ISSUE #208
boot time. ISSUE #235 . Also relevant to ISSUE #209
* Discovered that the BOOT_TIME clock can fail if called
immediately after boot.
* Refactored time fetching functions into `lqos_utils` with
proper error wrapping.
* Adjusted unknown IP expiration to issue a bus response of
"not ready yet" if the boot time clock is not available.
* Adjusted unknown IP expiration to handle 5-minutes in the
past being a negative number.
* Adjusted queue collection to suggest that you run
LibreQoS.py if queues don't exist - and fail gracefully,
without causing a hitch.
* The new Rust utility "webusers" manages /opt/libreqos/webusers.toml.
* You can add/update/remove/list users from that tool.
* The "allow anonymous" option in webusers.toml permits access for
unauthenticated users, but won't let them change anything. This is
for payne demonstrations.
* All web APIs and pages should now be secured, requiring a login.
* The login requires cookies.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Adds the `lqos_python` module to the Rust build system.
* `lqos_python` exposes an API for calling bus commands
directly, instead of via a helper. Currently, "is alive"
for testing the daemon, and IP mappings are exported.
* Update the build script to build the .so file and put
it where Python can find it.
* Exclude the binary from Git.
* Update `LibreQoS.py` to use bus commands for clearing,
deleting IP mappings. Adding is not yet covered, due
to the way commands are batched - and that not yet being
supported by the library.
* Add a check to `LibreQoS.py` that the `lqosd` daemon
is running and accepting connections. Abort if it isn't,
since nothing else will work anyway.
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>
* Adds build_rust.sh:
* Creates `src/bin` and `src/bin/static` if needed.
* Compiles all of the executables in the `rust` tree.
* Copies the executables into `src/bin`
* Copies the static web data for `lqos_node_manager`
into `bin/static`.
* Updates .gitignore to ignore the bin/ folder
* Updates LibreQoS.py to call bin/xdp_iphash_to_cpu_cmdline
instead of ./xdp_iphash_to_cpu_cmdline (cleaner).
* Updates graphInfluxDB.py to call the temporary Rust shim
that provides output like the previous one, hopefully
(poorly tested) allowing the existing graph system to work
with the new structure.
See #181
Signed-off-by: Herbert Wolverson <herberticus@gmail.com>