mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 04:36:40 +00:00
Two investigations of run 30781723102 stalled on files the rescue capture does not take. The zfs question - why the debian lab nodes cannot use a module their ubuntu counterparts apply on ten nodes - needed /proc/modules to see whether the module is loaded, /proc/misc to see whether it registered (a misc device never appears in /proc/devices, which is what docker_dataroot.sh was searching), `ls -l /dev/zfs` to tell a real node from the static one every privileged container inherits, and `zfs version` for the libzfs version a whole refuted hypothesis turned on. The matrix-mdad question - whether ~31.8s per git clone is a connect stall or a server-side queue - needs the TCP retransmission counters in /proc/net/snmp and /proc/net/netstat and the conntrack drop counters. Neither can be distinguished from per-clone timings alone. Executed on a host with no zfs: a missing binary and a missing proc file each land as text in the artifact rather than aborting the capture, which is the best-effort contract run() already implements. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Shared Utilities (utils/)
This directory contains shared Python helpers used by custom modules and plugins.
Purpose
Use utils/ for reusable code that should not be duplicated across:
library/modules,plugins/action/,plugins/filter/,plugins/lookup/.
Typical shared utilities:
- API clients,
- validation/conversion helpers,
- path and configuration helpers,
- cross-plugin/module domain logic.
- Shared HTTP(S) connection handler for multiple modules.
- Common validation or transformation functions for user input.
- Utility functions for interacting with Docker, LDAP, etc.
- Grouped helper packages such as
utils/domains/for related domain logic.
Design Guidelines
- Keep helpers focused and composable.
- Avoid side effects during import.
- Prefer explicit function/class APIs over implicit globals.
- Keep dependencies minimal so modules/plugins stay lightweight.
Example Import
from utils.domains.primary_domain import get_primary_domain
What Does Not Belong Here
- Standalone executable modules (put in
library/). - Ansible plugin entrypoints (put in
plugins/*).
References
- Module utilities: https://docs.ansible.com/ansible/latest/dev_guide/developing_module_utilities.html
- Plugin development: https://docs.ansible.com/ansible/latest/dev_guide/developing_plugins.html