Commit Graph
10 Commits
Author SHA1 Message Date
Herbert Wolverson f95243a99e Harden the install assertions and share the harness SSH options
- Assert each installed service individually: systemctl is-enabled and
  is-active only require one of several units to match.
- Require a configured lab before installing, since a first-run postinst
  correctly selects setup mode and disables the runtime services.
- Verify the installed binaries exist before the ldd check, which
  otherwise passes when a file is missing.
- Skip the second checksum pass after a fresh download.
- Share one LAB_SSH_OPTIONS array between lab_ssh and lab_scp.
- Drop a stale build_dpkg.sh comment and widen the missing-package
  message.
- Record the MAC-literal consolidation as a follow-up.
2026-09-23 14:24:11 -05:00
Herbert Wolverson 63060bb3fd Finish the final review items
- check-package parses arguments with a loop: --install can appear
  before or after the path, extra arguments are rejected, and an
  explicitly named missing package is reported as such.
- --install also asserts the installed services are enabled and active,
  checks both lqosd and liblqos_python.so for missing libraries, and
  imports liblqos_python with the installed venv.
- LQOS_SKIP_PREREQS still applies the /usr/sbin PATH fix, and the flag is
  documented in the helper and the unsupported-distribution message.
- Both image downloads share one download_verified helper.
- test-lifecycle uses wait_for_guest_ready, and lab_ssh/lab_scp bound
  stalled sessions with keepalives.
- Drop the two serde-defaulted UISP fixture keys, fix the remaining
  Spanish line, and correct the src/rust README path.
- Record the remaining follow-ups in the plan.
2026-09-23 14:17:02 -05:00
Herbert Wolverson 9692835493 Validate the .deb install on Debian 13 and fix --install parsing
check-package --install now accepts the flag before the path, and the
Debian run recorded: postinst rebuilt the Python 3.13 venv, installed
the systemd units, and activated lqosd, lqos_scheduler, and lqos_api
(all active), with dpkg reporting 'install ok installed'.
2026-09-23 14:08:56 -05:00
Herbert Wolverson 7beed87015 Address the remaining shell review findings
- wait_for_guest_ready returns early when the lease wait fails, instead
  of falling through to a misleading SSH timeout (errexit is disabled
  inside command substitutions).
- wait_for_cloud_init writes the long status to stderr so it is not
  swallowed by the caller's command substitution.
- assert_guest_os reports an SSH failure instead of exiting silently.
- LQOS_SKIP_PREREQS=1 lets developers on unsupported distributions skip
  the automatic prerequisite install.
- Try the standalone bpftool package when the kernel tools packages did
  not provide it, as on newer Ubuntu releases.
- Record the Ubuntu 24.04 regression result in the plan.
2026-09-23 13:59:22 -05:00
Herbert Wolverson 4ff02a9845 Make the package check non-vacuous and finish the third-pass fixes
- check-package asserts the .deb control fields against the expected
  dependency and recommends entries, so reverting the Debian dependency
  fix fails the check.
- check-package --install installs the .deb in the running guest and
  verifies the postinst results: dpkg state, installed unit, venv, and
  no missing shared libraries.
- Guest image facts (URL, checksum, tool, os-variant, expected
  os-release) come from one guest_os_facts helper; lab and the harness
  assertions share it.
- up records the guest OS choice too, so later commands cannot disagree
  with the running lab.
- wait_for_cloud_init is bounded with a guest-side timeout.
- Prerequisite extras install one package at a time so a missing
  kernel-pinned linux-tools package cannot block bpftool.
- Docs: renumber the update lists, fix the Spanish phrasing in the
  orphan update page, align the orphan troubleshooting page, and drop
  the repeated drift rationale from the front-end headers.
2026-09-23 13:53:28 -05:00
Herbert Wolverson 13bf747c8c Clarify the harness host/guest glibc note
The constraint is the glibc symbol versions a build requires, not simply
host newer than guest; the current bundle needs at most GLIBC_2.39.
2026-09-23 13:45:59 -05:00
Herbert Wolverson 14a7fca24c Address the final review findings
- management_ip() returned non-zero when no lease was active, which made
  wait_for_management_ip exit before its retry loop. It now always
  returns 0, filters on the ipv4 protocol column, and parses lease rows
  with bash instead of per-line awk subprocesses.
- wait_for_cloud_init() treated exit 2 as 'disabled'; cloud-init returns
  2 for recoverable errors and 0 when disabled, so a failed package
  install was silently accepted. Only 0 is accepted now, and the long
  status is printed on failure.
- check-package now waits for cloud-init through the shared
  wait_for_guest_ready helper, asserts the guest OS, and reports the
  missing-package error instead of exiting silently under pipefail.
- Resolve the guest OS and the expected os-release string once in
  lib/common.sh; configure.sh and check-package share the assertion.
- Delete the unused package-list helper and warn when bpftool is missing
  after the best-effort extras install.
- build_rust.sh stops when prerequisite installation fails, matching
  build_pkg_debian.sh.
- Add a sync pointer above the harness UISP config block.
2026-09-23 13:45:38 -05:00
Herbert Wolverson 9e4d54971e Fix harness bring-up issues and finish Debian 13 guest support
- ensure_lab_stopped() returned the status of its last 'a && die' list,
  so 'lab up' exited silently on a clean host. Use if/then instead.
- management_ip() trusted stale DHCP leases from a previous lab, which
  pointed configure at the wrong guests. Ignore expired leases and pick
  the newest active one.
- Wait for cloud-init to finish on the Linux guests; package installs
  were still running when configure started.
- Pin the Debian generic image instead of genericcloud: the cloud kernel
  disables CONFIG_PPP, so the PPPoE client cannot run.
- Record the guest OS choice in images/guest-os so later commands reuse
  it, and use one checksum helper for guest and RouterOS downloads.
- Assert the guest OS matches the requested one and that lqosd pinned
  /sys/fs/bpf/map_ip_to_cpu_and_tc.
- Add 'lab check-package', which validates .deb dependency resolution
  inside the running guest.
- Bring the harness config fixture up to the current schema; it was
  missing the [uisp_integration] section.
2026-09-23 13:21:01 -05:00
Herbert Wolverson 3e0c1f29f3 Add a Debian 13 guest option to the RADIUS harness
LAB_GUEST_OS selects the Linux guest image: ubuntu (default) or debian.
The Debian image is pinned to a date-stamped trixie genericcloud build
with its SHA-512 from SHA512SUMS, and virt-install --os-variant is
derived from the guest OS with a LAB_OS_VARIANT override for hosts whose
osinfo database does not know debian13.

user-data installs libelf1t64, which is the current package name on both
Ubuntu 24.04 and Debian 13.
2026-09-23 12:19:02 -05:00
Herbert Wolverson 9987302830 Add portable RADIUS lifecycle harness 2026-07-21 13:39:07 -05:00