Pcornel
Automation · Validation

Configuration Validation

Cheat sheet · https://pcornel.dk/topic.php?topic=5916

Back to the Topic

Answer

Configuration Validation evaluates whether a desired configuration is internally coherent, policy-compliant, compatible with the target and likely to converge before or after it is applied.

Remember

  • Configuration valid ≠ target can converge successfully.
  • Desired configuration ≠ effective runtime configuration.
  • Policy compliant ≠ application healthy.
  • Diff looks expected ≠ hidden defaults or generated state are correct.

First checks

  • nginx -t / sshd -t / named-checkconf — native config validation
  • Batfish for network configs — semantic
  • Candidate validate (NETCONF) — device-side

Commands

git diff --exit-code <baseline-ref> -- <managed-path>
Read-only/validation observation for the exact managed-path delta relative to an approved Git baseline reference.

Verify in this order

rendered config → validators → deploy only if valid

Where it usually breaks

Configuration Validation proves only the checked configuration constraints and observed effective state; it does not by itself prove convergence durability or workload correctness.

Configuration Validation validation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Criteria / inputCriteria, source revision, validator and exact target identity are explicitA generic pass exists without versioned criteria or target correlation
Preconditions / operationCurrent authoritative facts are bound to the exact operationStale preflight or requested state substitutes for execution-time facts
Effective outcomeAuthoritative state/read-back and service-relevant evidence match the expected resultTool/test/validator success substitutes for effective target or workload proof
Limits / next actionCoverage limits, unknowns and failures drive the next narrower checkUnknown evidence becomes pass, retries hide failures or broad success is inferred from one check

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5916

Confirmation

Confirm action

Continue?