Restore known-good Pimox worker defaults
This commit is contained in:
parent
d80960fce0
commit
e8b9b57d77
14
README.md
14
README.md
|
|
@ -734,19 +734,19 @@ qemu-guest-agent. Static mode uses
|
||||||
`LAB_PIMOX_WORKER_STATIC_IPS="192.168.100.66 192.168.100.67 192.168.100.76"`,
|
`LAB_PIMOX_WORKER_STATIC_IPS="192.168.100.66 192.168.100.67 192.168.100.76"`,
|
||||||
`LAB_PIMOX_WORKER_GATEWAY=192.168.100.1`, and
|
`LAB_PIMOX_WORKER_GATEWAY=192.168.100.1`, and
|
||||||
`LAB_PIMOX_WORKER_DNS_SERVERS="192.168.100.89 1.1.1.1"`.
|
`LAB_PIMOX_WORKER_DNS_SERVERS="192.168.100.89 1.1.1.1"`.
|
||||||
Worker NIC MAC addresses are also auto-generated by Pimox by default. Set
|
Worker NIC MAC addresses default to the VMID-derived deterministic format used
|
||||||
`LAB_PIMOX_WORKER_MAC_MODE=deterministic` only when you explicitly need stable
|
by the original working Pimox worker path. Set `LAB_PIMOX_WORKER_MAC_MODE=auto`
|
||||||
MAC addresses derived from VM IDs.
|
only when you explicitly want Pimox to generate the MAC.
|
||||||
Worker creation fails faster than template creation: static guest-network
|
Worker creation fails faster than template creation: static guest-network
|
||||||
configuration waits up to `LAB_PIMOX_GUEST_AGENT_CONFIG_TIMEOUT_SECONDS=120`,
|
configuration waits up to `LAB_PIMOX_GUEST_AGENT_CONFIG_TIMEOUT_SECONDS=120`,
|
||||||
worker IP/SSH readiness waits up to `LAB_PIMOX_WORKER_WAIT_TIMEOUT_SECONDS=600`,
|
worker IP/SSH readiness waits up to `LAB_PIMOX_WORKER_WAIT_TIMEOUT_SECONDS=600`,
|
||||||
and SSH after an IP appears waits up to `LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS=180`.
|
and SSH after an IP appears waits up to `LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS=600`.
|
||||||
After static network assignment, the guest must ping the gateway and
|
After static network assignment, the guest must ping the gateway and
|
||||||
`${LAB_PIMOX_WORKER_LAN_PROBE_HOST:-LAB_DEBIAN_LAN_IP}`; set
|
`${LAB_PIMOX_WORKER_LAN_PROBE_HOST:-LAB_DEBIAN_LAN_IP}`; set
|
||||||
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE=false` only when ICMP is blocked. After
|
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE=false` only when ICMP is blocked. After
|
||||||
qemu-guest-agent reports an IP, Debian must be able to ping the worker before
|
qemu-guest-agent reports an IP, Debian skips the extra ICMP host probe by
|
||||||
SSH retries continue; set `LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE=false` only when
|
default and lets SSH be the reachability check. Set
|
||||||
worker ICMP is intentionally blocked.
|
`LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE=true` only when you want a faster ICMP gate.
|
||||||
`LAB_PIMOX_GUEST_TIMEOUT_SECONDS` remains the broader template-build timeout.
|
`LAB_PIMOX_GUEST_TIMEOUT_SECONDS` remains the broader template-build timeout.
|
||||||
|
|
||||||
Long-running `./jeannie up` steps keep compact output by default, but
|
Long-running `./jeannie up` steps keep compact output by default, but
|
||||||
|
|
|
||||||
|
|
@ -734,19 +734,19 @@ qemu-guest-agent. Static mode uses
|
||||||
`LAB_PIMOX_WORKER_STATIC_IPS="192.168.100.66 192.168.100.67 192.168.100.76"`,
|
`LAB_PIMOX_WORKER_STATIC_IPS="192.168.100.66 192.168.100.67 192.168.100.76"`,
|
||||||
`LAB_PIMOX_WORKER_GATEWAY=192.168.100.1`, and
|
`LAB_PIMOX_WORKER_GATEWAY=192.168.100.1`, and
|
||||||
`LAB_PIMOX_WORKER_DNS_SERVERS="192.168.100.89 1.1.1.1"`.
|
`LAB_PIMOX_WORKER_DNS_SERVERS="192.168.100.89 1.1.1.1"`.
|
||||||
Worker NIC MAC addresses are also auto-generated by Pimox by default. Set
|
Worker NIC MAC addresses default to the VMID-derived deterministic format used
|
||||||
`LAB_PIMOX_WORKER_MAC_MODE=deterministic` only when you explicitly need stable
|
by the original working Pimox worker path. Set `LAB_PIMOX_WORKER_MAC_MODE=auto`
|
||||||
MAC addresses derived from VM IDs.
|
only when you explicitly want Pimox to generate the MAC.
|
||||||
Worker creation fails faster than template creation: static guest-network
|
Worker creation fails faster than template creation: static guest-network
|
||||||
configuration waits up to `LAB_PIMOX_GUEST_AGENT_CONFIG_TIMEOUT_SECONDS=120`,
|
configuration waits up to `LAB_PIMOX_GUEST_AGENT_CONFIG_TIMEOUT_SECONDS=120`,
|
||||||
worker IP/SSH readiness waits up to `LAB_PIMOX_WORKER_WAIT_TIMEOUT_SECONDS=600`,
|
worker IP/SSH readiness waits up to `LAB_PIMOX_WORKER_WAIT_TIMEOUT_SECONDS=600`,
|
||||||
and SSH after an IP appears waits up to `LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS=180`.
|
and SSH after an IP appears waits up to `LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS=600`.
|
||||||
After static network assignment, the guest must ping the gateway and
|
After static network assignment, the guest must ping the gateway and
|
||||||
`${LAB_PIMOX_WORKER_LAN_PROBE_HOST:-LAB_DEBIAN_LAN_IP}`; set
|
`${LAB_PIMOX_WORKER_LAN_PROBE_HOST:-LAB_DEBIAN_LAN_IP}`; set
|
||||||
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE=false` only when ICMP is blocked. After
|
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE=false` only when ICMP is blocked. After
|
||||||
qemu-guest-agent reports an IP, Debian must be able to ping the worker before
|
qemu-guest-agent reports an IP, Debian skips the extra ICMP host probe by
|
||||||
SSH retries continue; set `LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE=false` only when
|
default and lets SSH be the reachability check. Set
|
||||||
worker ICMP is intentionally blocked.
|
`LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE=true` only when you want a faster ICMP gate.
|
||||||
`LAB_PIMOX_GUEST_TIMEOUT_SECONDS` remains the broader template-build timeout.
|
`LAB_PIMOX_GUEST_TIMEOUT_SECONDS` remains the broader template-build timeout.
|
||||||
|
|
||||||
Long-running `./{{ main_script }} up` steps keep compact output by default, but
|
Long-running `./{{ main_script }} up` steps keep compact output by default, but
|
||||||
|
|
|
||||||
|
|
@ -148,20 +148,20 @@ reservations are not available: set `LAB_PIMOX_WORKER_NETWORK_MODE=static`,
|
||||||
`LAB_PIMOX_WORKER_STATIC_IPS="192.168.100.66 192.168.100.67 192.168.100.76"`,
|
`LAB_PIMOX_WORKER_STATIC_IPS="192.168.100.66 192.168.100.67 192.168.100.76"`,
|
||||||
`LAB_PIMOX_WORKER_GATEWAY=192.168.100.1`, `LAB_PIMOX_WORKER_INTERFACE=enp0s18`,
|
`LAB_PIMOX_WORKER_GATEWAY=192.168.100.1`, `LAB_PIMOX_WORKER_INTERFACE=enp0s18`,
|
||||||
and `LAB_PIMOX_WORKER_DNS_SERVERS="192.168.100.89 1.1.1.1"`.
|
and `LAB_PIMOX_WORKER_DNS_SERVERS="192.168.100.89 1.1.1.1"`.
|
||||||
Worker NIC MAC addresses are auto-generated by Pimox by default. Set
|
Worker NIC MAC addresses default to the VMID-derived deterministic format used
|
||||||
`LAB_PIMOX_WORKER_MAC_MODE=deterministic` only when VMID-derived MAC addresses
|
by the original working Pimox worker path. Set `LAB_PIMOX_WORKER_MAC_MODE=auto`
|
||||||
are required.
|
only when Pimox-generated MAC addresses are preferred.
|
||||||
Worker clone failures are intentionally faster than template build failures:
|
Worker clone failures are intentionally faster than template build failures:
|
||||||
`LAB_PIMOX_GUEST_AGENT_CONFIG_TIMEOUT_SECONDS=120`,
|
`LAB_PIMOX_GUEST_AGENT_CONFIG_TIMEOUT_SECONDS=120`,
|
||||||
`LAB_PIMOX_WORKER_WAIT_TIMEOUT_SECONDS=600`, and
|
`LAB_PIMOX_WORKER_WAIT_TIMEOUT_SECONDS=600`, and
|
||||||
`LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS=180` by default. The broader
|
`LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS=600` by default. The broader
|
||||||
`LAB_PIMOX_GUEST_TIMEOUT_SECONDS` still controls template preparation.
|
`LAB_PIMOX_GUEST_TIMEOUT_SECONDS` still controls template preparation.
|
||||||
The static network step also checks guest LAN reachability by pinging the
|
The static network step also checks guest LAN reachability by pinging the
|
||||||
gateway and `${LAB_PIMOX_WORKER_LAN_PROBE_HOST:-LAB_DEBIAN_LAN_IP}`. The Debian
|
gateway and `${LAB_PIMOX_WORKER_LAN_PROBE_HOST:-LAB_DEBIAN_LAN_IP}`. After
|
||||||
host then pings the reported worker IP before continuing SSH retries. Disable
|
qemu-guest-agent reports an IP, Debian skips the extra host-side ICMP probe by
|
||||||
those checks only for ICMP-blocked networks with
|
default and lets SSH be the reachability check. Disable the static LAN probe
|
||||||
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE=false` or
|
with `LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE=false`; enable the host-side ICMP gate
|
||||||
`LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE=false`.
|
with `LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE=true`.
|
||||||
|
|
||||||
Worker indexes are stable: index `1` maps to VMID `9010`,
|
Worker indexes are stable: index `1` maps to VMID `9010`,
|
||||||
`pimox-worker-01`, and worker key `pimox01`; index `2` maps to VMID `9011`,
|
`pimox-worker-01`, and worker key `pimox01`; index `2` maps to VMID `9011`,
|
||||||
|
|
|
||||||
|
|
@ -548,8 +548,9 @@ state.
|
||||||
Jeannie should configure guest static IPs through qemu-guest-agent.
|
Jeannie should configure guest static IPs through qemu-guest-agent.
|
||||||
|
|
||||||
`LAB_PIMOX_WORKER_MAC_MODE`
|
`LAB_PIMOX_WORKER_MAC_MODE`
|
||||||
: Worker NIC MAC mode. Defaults to `auto`, letting Pimox generate the MAC. Set
|
: Worker NIC MAC mode. Defaults to `deterministic`, deriving MAC addresses from
|
||||||
to `deterministic` to derive MAC addresses from VM IDs.
|
VM IDs to match the original working Pimox worker path. Set to `auto` to let
|
||||||
|
Pimox generate the MAC.
|
||||||
|
|
||||||
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE`
|
`LAB_PIMOX_WORKER_REQUIRE_LAN_PROBE`
|
||||||
: Require the worker guest to ping the LAN gateway and probe host after static
|
: Require the worker guest to ping the LAN gateway and probe host after static
|
||||||
|
|
@ -557,7 +558,7 @@ IP assignment. Defaults to `true`.
|
||||||
|
|
||||||
`LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE`
|
`LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE`
|
||||||
: Require the Debian host to ping the worker IP before waiting for SSH. Defaults
|
: Require the Debian host to ping the worker IP before waiting for SSH. Defaults
|
||||||
to `true`.
|
to `false`; SSH is the default reachability check.
|
||||||
|
|
||||||
`LAB_SKIP_PREFLIGHT=true`
|
`LAB_SKIP_PREFLIGHT=true`
|
||||||
: Skip preflight checks. Use only for targeted troubleshooting.
|
: Skip preflight checks. Use only for targeted troubleshooting.
|
||||||
|
|
|
||||||
6
jeannie
6
jeannie
|
|
@ -1105,11 +1105,11 @@ wait_for_pimox_guest_ssh() {
|
||||||
local last_ssh_output=""
|
local last_ssh_output=""
|
||||||
local last_host_probe_output=""
|
local last_host_probe_output=""
|
||||||
local host_probe_failures=0
|
local host_probe_failures=0
|
||||||
local require_host_probe="${LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE:-true}"
|
local require_host_probe="${LAB_PIMOX_WORKER_REQUIRE_HOST_PROBE:-false}"
|
||||||
local next_log
|
local next_log
|
||||||
local ssh_deadline=0
|
local ssh_deadline=0
|
||||||
local ssh_output
|
local ssh_output
|
||||||
local ssh_timeout_seconds="${LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS:-180}"
|
local ssh_timeout_seconds="${LAB_PIMOX_GUEST_SSH_TIMEOUT_SECONDS:-600}"
|
||||||
|
|
||||||
ip_filter_description="matching prefix ${ip_prefix}"
|
ip_filter_description="matching prefix ${ip_prefix}"
|
||||||
if [[ -z "${ip_prefix}" ]]; then
|
if [[ -z "${ip_prefix}" ]]; then
|
||||||
|
|
@ -1230,7 +1230,7 @@ pimox_worker_static_ip() {
|
||||||
pimox_worker_net0_config() {
|
pimox_worker_net0_config() {
|
||||||
local vmid="$1"
|
local vmid="$1"
|
||||||
local bridge="$2"
|
local bridge="$2"
|
||||||
local mac_mode="${LAB_PIMOX_WORKER_MAC_MODE:-auto}"
|
local mac_mode="${LAB_PIMOX_WORKER_MAC_MODE:-deterministic}"
|
||||||
local mac
|
local mac
|
||||||
|
|
||||||
case "${mac_mode}" in
|
case "${mac_mode}" in
|
||||||
|
|
|
||||||
|
|
@ -336,11 +336,11 @@ test_pimox_guest_exec_exitcode_parser() {
|
||||||
assert_command_failure_contains "pimox guest exec rejects invalid JSON" "" pimox_guest_exec_exitcode 'not json'
|
assert_command_failure_contains "pimox guest exec rejects invalid JSON" "" pimox_guest_exec_exitcode 'not json'
|
||||||
}
|
}
|
||||||
|
|
||||||
test_pimox_worker_net0_config_defaults_to_auto_mac() {
|
test_pimox_worker_net0_config_defaults_to_deterministic_mac() {
|
||||||
unset LAB_PIMOX_WORKER_MAC_MODE
|
unset LAB_PIMOX_WORKER_MAC_MODE
|
||||||
assert_eq "pimox worker net0 defaults to auto MAC" "virtio,bridge=vmbr0" "$(pimox_worker_net0_config 9010 vmbr0)"
|
assert_eq "pimox worker net0 defaults to deterministic MAC" "virtio=02:68:10:00:23:32,bridge=vmbr0" "$(pimox_worker_net0_config 9010 vmbr0)"
|
||||||
LAB_PIMOX_WORKER_MAC_MODE=deterministic
|
LAB_PIMOX_WORKER_MAC_MODE=auto
|
||||||
assert_eq "pimox worker net0 deterministic MAC opt-in" "virtio=02:68:10:00:23:32,bridge=vmbr0" "$(pimox_worker_net0_config 9010 vmbr0)"
|
assert_eq "pimox worker net0 auto MAC opt-in" "virtio,bridge=vmbr0" "$(pimox_worker_net0_config 9010 vmbr0)"
|
||||||
unset LAB_PIMOX_WORKER_MAC_MODE
|
unset LAB_PIMOX_WORKER_MAC_MODE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -358,7 +358,7 @@ test_inventory_validator_rejects_ip_drift
|
||||||
test_heal_cooldown_escalates_to_diagnostics
|
test_heal_cooldown_escalates_to_diagnostics
|
||||||
test_pimox_worker_static_ip_selection
|
test_pimox_worker_static_ip_selection
|
||||||
test_pimox_guest_exec_exitcode_parser
|
test_pimox_guest_exec_exitcode_parser
|
||||||
test_pimox_worker_net0_config_defaults_to_auto_mac
|
test_pimox_worker_net0_config_defaults_to_deterministic_mac
|
||||||
|
|
||||||
if ((FAILURES > 0)); then
|
if ((FAILURES > 0)); then
|
||||||
printf '\n%s unit test(s) failed.\n' "${FAILURES}" >&2
|
printf '\n%s unit test(s) failed.\n' "${FAILURES}" >&2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue