Commit Graph

1148 Commits

Author SHA1 Message Date
Herbert Wolverson
791ff97eef Update DPKG build script to use version numbering from date
to handle nightly or similar builds and always increase the
build number for upgrades.
2023-02-21 20:56:46 +00:00
Herbert Wolverson
3e9ff0c0f5 (Very alpha!) Add dpkg builder and initial configurator
* Adds a new Rust program, `lqos_setup`.
    * If no /etc/lqos.conf is found, prompts for interfaces and
      creates a dual-interface XDP bridge setup.
    * If no /opt/libreqos/src/ispConfig.py is found, prompts
      for bandwidth and creates one (using the interfaces also)
    * Same for ShapedDevices.csv and network.json
    * If no webusers are found, prompts to make one.
* Adds build_dbpkg.sh
    * Creates a new directory named `dist`
    * Builds the Rust components in a portable mode.
    * Creates a list of dependencies and DEBIAN directory
      with control and postinst files.
    * Handles PIP dependencies in postinst
    * Calls the new `lqos_setup` program for final
      configuration.
    * Sets up the daemons in systemd and enables them.

In very brief testing, I had a working XDP bridge with
1 fake user and a total bandwidth limit configured and
working after running:

dpkg -i 1.4-1.dpkg
apt -f install

Could still use some tweaking.
2023-02-21 20:26:34 +00:00
Robert Chacón
e74662631c
Merge pull request #269 from interduo/chmodx
improvement: add +x for lqTools.py
2023-02-19 00:36:36 -07:00
Jarosław Kłopotek - INTERDUO
71f75cc6c3 improvement: add +x for lqTools.py 2023-02-16 15:41:27 +01:00
Herbert Wolverson
da44d38888 Temporary: mark --updateonly as unavailable if OnAStick
The partial reload mechanism *really* doesn't work with OnAStick
configurations at present. There's a lot of work required to make
it function. In the meantime, warn the poor user that this
isn't going to work.

Affects ISSUE #129
2023-02-15 17:14:29 +00:00
Herbert Wolverson
e7d7429058 Fix partial reload in LibreQoS.py for NOT OnAStick mode
OnAStick mode is still broken for partial updates. The
`addDeviceIPsToFilter` function was referencing circuit
information (the class_id) that wasn't present in the
partially reloaded data.

Changed shell call to call `add_ip_mapping` which accesses
the bus directly, saving a shell call.

Part of ISSUE #239 - does not fix it for "on a stick"
configurations.
2023-02-15 17:04:29 +00:00
Herbert Wolverson
54d9fa99a5 Improve error messaged when parsing IPs for iphash_to_cpu/Python
Display the offending string as well as the general "Class id must
be in the format (major):(minor), e.g. 1:12.

May help with diagnosing #239 (since "Error: Class id..." is the
only visible error message.
2023-02-15 15:24:11 +00:00
Herbert Wolverson
f8f438e8d7 Add Python Version Check to Python Scripts
ISSUE #204 : Running on versions prior to 3.10 will fail, due to
the use of `match` statements. Other parts of the script assume
a recent Python also, and the system as a whole expects a recent
version of Ubuntu.

`pythonCheck.py` polls `sys.version_info` to detect the in-use
version of Python. If the version is prior to 3.10, it bails out
with the message "LibreQoS requires Python 3.10 or greater".

This should help with outdated OS detection in general.
2023-02-15 15:00:53 +00:00
Herbert Wolverson
85caa6be19 Stop using unicode extended characters in lqtop
Remove the up and down arrows that render strangely in fonts
that don't support full unicode graphics. Add text UP/DOWN
headings instead.

FIXES #266
2023-02-15 14:41:41 +00:00
Herbert Wolverson
088f608614 #229 - Run cargo fmt to format everything. 2023-02-14 22:06:57 +00:00
Herbert Wolverson
6fe97e97b6 an atomic compare_exchange. 2023-02-14 21:36:16 +00:00
Herbert Wolverson
dcb0ae8444 Add an additional NUM_CPUS atomic to store the actual size. CPU
utilization is updated in a lock-free array of atomics. Another
lock removed (and another unmeasurably small gain)
2023-02-14 21:27:37 +00:00
Herbert Wolverson
c0f83dbc51 Replace MEMORY_USED RwLock'd array with a pair of atomic u64s,
for a non-noticeable performance improvement.
2023-02-14 21:01:10 +00:00
Herbert Wolverson
8f7293760c Just directly initialize the atomic bool. 2023-02-14 20:41:43 +00:00
Herbert Wolverson
27c079f9cf Add lqusers.toml to .gitignore after it was renamed. 2023-02-14 20:41:38 +00:00
Herbert Wolverson
c096226665 ISSUE #229 - Change "reload required" from a lock with a bool inside
to a proper atomic bool, for a completely unnoticable performance
improvement.
2023-02-14 20:37:09 +00:00
Herbert Wolverson
1da10d7a23 Add bin/lqusers to the gitignore file. 2023-02-14 20:37:02 +00:00
Dave Taht
a58ce5cd0b Finished conversion to lqusers from webusers
Note that you will need to regenerate the webusers.toml file
after this.

Part of my motivation for this is that this file is not strictly
for governing web permissions in the future.
2023-02-09 15:26:27 +00:00
Dave Taht
8ba5aed14e lqusers: change name of web admin tool from webusers to lqusers
lqusers is consistent with the prefix used elsewhere in LibreQos.

Something one character shorter than that came to mind, but
I resisted.
2023-02-09 15:21:02 +00:00
Herbert Wolverson
51c369b9b5 Update dependencies. 2023-02-09 14:36:47 +00:00
Herbert Wolverson
32a75bde0f ISSUE #258 - Specifically ignore [idForCircuitsWithoutParentNodes] in queueingStrucutre.json 2023-02-09 14:15:56 +00:00
Herbert Wolverson
11644dd1f1 #258 - Unrecognized node in queueingStructure.json generates a warning and continues rather than aborting hard. This makes it a lot more tolerant of anything changing. 2023-02-09 14:15:06 +00:00
Herbert Wolverson
787344e8f4 Fix typo I noticed in #258 - incorrect file name referenced in error message. 2023-02-09 14:14:28 +00:00
Dave Taht
b1f2bfb053 fix Spelling error in example
Fixes: https://github.com/LibreQoE/LibreQoS/issues/262
2023-02-09 11:51:33 +00:00
Robert Chacón
fa8d67c554
Fix https://github.com/LibreQoE/LibreQoS/issues/252 2023-02-08 20:48:05 -07:00
Dave Taht
04f1f4c2cb webusers: correct usage message 2023-02-09 02:44:39 +00:00
Dave Taht
79db32ff99 Proper spelling and quoting 2023-02-08 19:52:28 +00:00
Dave Täht
679c5e9a3a
Merge pull request #260 from interduo/patch-28
improvement: add tuning of performance governor
2023-02-08 11:50:56 -08:00
Dave Taht
71988e6046 Updated copyright message: It is 2023 now
At least it was when last I looked
2023-02-08 15:56:09 +00:00
Interduo
1904fb4690
improvement: add tuning of performance governor 2023-02-08 16:22:56 +01:00
Herbert "TheBracket
2ae80f9fc3
Merge pull request #259 from trendal/main
login page enter key action
2023-02-08 06:40:21 -08:00
Trendal Toews
2ff6284a6b login page enter key action 2023-02-08 06:56:31 +00:00
Robert Chacón
46457878a0
Fix https://github.com/LibreQoE/LibreQoS/pull/257 2023-02-07 06:38:20 -07:00
Robert Chacón
20567736d7
Update TESTING-1.4.md 2023-02-07 06:29:04 -07:00
Robert Chacón
4caf9712cf
Fix https://github.com/LibreQoE/LibreQoS/issues/252 2023-02-07 06:24:49 -07:00
Dave Täht
f89e2d5847
Merge pull request #251 from interduo/patch-26
improvement: make systemd unit services managing by one command and n…
2023-02-07 04:52:47 -08:00
Robert Chacón
ff40478eee
Fix https://github.com/LibreQoE/LibreQoS/issues/255 2023-02-06 19:44:48 -07:00
Robert Chacón
dee2c465be
Fix https://github.com/LibreQoE/LibreQoS/issues/253 2023-02-06 19:22:51 -07:00
Robert Chacón
2811148ffb
Merge pull request #256 from LibreQoE/fixGraphing324
Fix #254
2023-02-06 18:46:18 -07:00
Robert Chacón
8b33dd7be6
Fix https://github.com/LibreQoE/LibreQoS/issues/254 2023-02-06 18:45:08 -07:00
Robert Chacón
ab1de300b1
Fix https://github.com/LibreQoE/LibreQoS/issues/254 2023-02-06 18:43:51 -07:00
rchac
cd147708fd Add back v1.3 directory 2023-02-06 18:41:23 -07:00
Robert Chacón
9fb0e9d6ca
Switch back to unpaid safety check 2023-02-06 17:30:32 -07:00
Interduo
41c6c3c3bb
improvement: make systemd unit services managing by one command and not three 2023-02-06 13:49:30 +01:00
Robert Chacón
ee30dc027e
Update TESTING-1.4.md 2023-02-04 20:00:40 -07:00
Dave Taht
672bb78d4b Fix some spelling errors 2023-02-04 18:45:41 -08:00
Robert Chacón
6e4d17679a
Switch to linear interpolation for better visualization 2023-02-04 19:32:56 -07:00
Robert Chacón
f536018755
https://github.com/LibreQoE/LibreQoS/issues/129#issuecomment-1372213698 2023-02-04 19:20:25 -07:00
Robert Chacón
65a62c7a50
Update TESTING-1.4.md 2023-02-04 18:29:58 -07:00
Robert Chacón
1a5f7dc2b9
Update TESTING-1.4.md 2023-02-04 18:28:14 -07:00