F #466: Ensure one-deploy-validation playbooks always finish with full error reporting and always clean the system - #55
Open
rpetrescu-one wants to merge 1 commit into
Open
Conversation
…reporting and always clean the system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reworks the validation suite around three guarantees:
templates, OneFlow services, files, packages, processes, bridges/IPs) is
registered in a run manifest and removed by an unconditional final sweep,
regardless of test outcomes. What cannot be cleaned (e.g. a node that is
powered off) is reported honestly as a LEFTOVER with an operator runbook.
the others: template export and test-vnet handling moved into shared
validation_commonservices (ensure_test_template/ensure_test_vnet)with created-vs-reused disposition driving cleanup.
any_errors_fatalis gone; every test runs in ablock/rescue/always harness, records
ok/failed/skipped — <reason>,and the suite always reaches the sweep and the report.
Highlights
odv_manifestfact with a/tmp/odv_manifest.jsonmirror; final sweep (name-verified deletion, id fallback only when the name
still matches) plus a pre-run preclean that removes the previous run's
leftovers.
validation.cleanup.keep_exported_imagesopts out of image/templatedeletion. Second net catches strays by the
odv-*naming convention.every resource's fate), PASS/INFO/WARN/FAIL semantics (config-driven skips
render INFO), partial (
-t <tag>) runs are labeled PARTIAL RUN,worst-of aggregation per test.
import_rolewhere needed so tags actually reachrole tasks) and an induced-failure hook (
-e odv_fail_in=<slug>, 12 slugs)to exercise the harness.
RAFT-leader-aware hook-log verification, configurable deploy/recovery
windows, a wedge-guard for recreates stuck in
CLEANUP_RESUBMIT(appliesonevm recover --failureonce and reports WARNING — never a silent pass),fenced host set OFFLINE (stops the host_error hook re-fire loop), and
optional fully automated node recovery via
validation.vm_ha.node_power_on_cmd(power-on counterpart of the fence driver;
$ODV_FENCED_HOST/$ODV_FENCED_HOST_IDcontract). VM HA runs last; OneFlow runs before thecore-services checks (HA-leader oned restarts destabilize flow for minutes).
on; the always-restorere-enables only genuinely disabled hosts (a blind enable resets healthy
hosts' monitoring to INIT and starves the next test's scheduler).
per-role operator docs in
docs/<role>.md(all options actually read by thecode, defaults from code, examples, report keys, cleanup behavior) and a
docs/README.mdindex. Option tables audited doc↔code both directions.a variable that was never set (multi-cluster
create_vnetcreated anunsuffixed vnet the sweep then missed) and now tolerates omitted
bridge/phydev; ldap_auth login-endpoint normalization default alignedwith role defaults.
cleanup_test_vmandvalidation_frontendroles (superseded bythe shared services, the sweep, and the report play).
Behavior changes to review
exported marketplace images/templates (
keep_exported_images: false).run_conn_matrixgate defaults tofalsein the play (reference inventoryalready disables it; enabling requires OneGate).
Testing
make test— offline regression harness for the sweep plan/dedup/reportlogic (63 assertions) + shell lint;
ansible-playbook --syntax-checkgreen.(3 front-ends, RAFT, 2 KVM nodes) across ~25 runs: full suite green
including VM HA end-to-end (error → hook → fence → recreate → RUNNING on the
surviving host → automated node recovery), induced-failure runs clean up and
report honestly, independence verified with
run_test_vm: false, partialtag runs labeled correctly, zero unexpected leftovers — lab returned to its
exact pre-run baseline.