Compare commits
4
Commits
f48551a4a6
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b53170b51 | ||
|
|
5fcd95eeb4 | ||
|
|
9a5ee5610b | ||
|
|
f314fa331e |
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Install or upgrade kernelwatch-agent on a Debian 12/13 or Ubuntu 22.04/24.04 host.
|
# Install or upgrade kernelwatch-agent on a Debian 12/13 or Ubuntu 22.04/24.04/26.04 host.
|
||||||
#
|
#
|
||||||
# sudo ./install.sh --server https://kernelwatch.example.internal [--ca ca.pem]
|
# sudo ./install.sh --server https://kernelwatch.example.internal [--ca ca.pem]
|
||||||
# [--with-needrestart] [--with-apt-update | --without-apt-update]
|
# [--with-needrestart] [--with-apt-update | --without-apt-update]
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ RuntimeDirectoryMode=0755
|
|||||||
RuntimeDirectoryPreserve=yes
|
RuntimeDirectoryPreserve=yes
|
||||||
UMask=0022
|
UMask=0022
|
||||||
TimeoutStartSec=5min
|
TimeoutStartSec=5min
|
||||||
|
# Lowest best-effort disk priority, not the idle class: idle gets disk time only
|
||||||
|
# when nothing else wants it, so on a host with constant I/O apt waits on
|
||||||
|
# reading and writing its lists until the timeout kills it, every run.
|
||||||
Nice=10
|
Nice=10
|
||||||
IOSchedulingClass=idle
|
IOSchedulingClass=best-effort
|
||||||
|
IOSchedulingPriority=7
|
||||||
|
|
||||||
# apt needs root to write /var/lib/apt and drops to _apt for downloads, so this
|
# apt needs root to write /var/lib/apt and drops to _apt for downloads, so this
|
||||||
# runs as root (the default) but loses everything apt update doesn't touch.
|
# runs as root (the default) but loses everything apt update doesn't touch.
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Install or upgrade the kernelwatch server on Debian 12/13 or Ubuntu 24.04.
|
# Install or upgrade the kernelwatch server on Debian 12+ or Ubuntu 22.04+.
|
||||||
#
|
#
|
||||||
# sudo ./install.sh
|
# sudo ./install.sh
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -327,6 +327,13 @@ class PackagingTest(unittest.TestCase):
|
|||||||
unit = self.read("kernelwatch-apt-update.service")
|
unit = self.read("kernelwatch-apt-update.service")
|
||||||
self.assertNotRegex(unit, r"(?m)^(User|DynamicUser)=")
|
self.assertNotRegex(unit, r"(?m)^(User|DynamicUser)=")
|
||||||
|
|
||||||
|
def test_apt_update_disk_priority_cant_be_starved(self):
|
||||||
|
# The idle class gets no disk time while anything else does I/O, so on a busy
|
||||||
|
# host apt never finished inside TimeoutStartSec.
|
||||||
|
unit = self.read("kernelwatch-apt-update.service")
|
||||||
|
self.assertNotRegex(unit, r"(?m)^IOSchedulingClass=(idle|3)\s*$")
|
||||||
|
self.assertIn("\nIOSchedulingClass=best-effort\n", unit)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
Reference in new issue
Block a user