Document updating the agents, and harden the Windows update check
- AGENT_UPDATE.md: when an agent needs updating, how (reuse the stored token or rotate it), how to do many servers, how to check it worked, and why a server can stay 'not reported'. - Windows agent: the Windows Update search runs in its own process with a 150 s limit (the scheduled task is stopped after five minutes), a failed search is not retried for an hour, and the cache is read the same in PowerShell 7 and Windows PowerShell 5.1. - Linux agent: says in the journal when the package manager could not be read. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
171511c6db
commit
3da5c639b1
5 files changed
+225
-18
No files matched your search
@@ -215,6 +215,11 @@ collect_updates() {
|
||||
[[ -f /run/reboot-needed ]] && reboot="true"
|
||||
fi
|
||||
|
||||
if [[ -n "$manager" && ! "$count" =~ ^[0-9]+$ ]]; then
|
||||
# In the journal (systemctl status / journalctl -u homelab-manager-agent) so "not reported" has a reason to look for.
|
||||
echo "Note: couldn't read the pending updates from $manager - the report goes without them." >&2
|
||||
fi
|
||||
|
||||
if [[ -n "$manager" && "$count" =~ ^[0-9]+$ ]]; then
|
||||
[[ "$security" =~ ^[0-9]+$ ]] || security="null"
|
||||
UPDATES_JSON=$(jq -n --arg manager "$manager" --argjson count "$count" --argjson security "$security" --argjson reboot "$reboot" \
|
||||
|
||||
Reference in new issue
Block a user