Repository navigation
YAML config, atomic JSON writes, and startup error visibility - #479
Merged
Merged
Conversation
Add temp+fsync+rename helper and use it for cluster_state.json so a power cut cannot leave a half-written state file.
Marshal data files to memory then atomic write, tolerate truncated dnscache.json on startup, and include file paths in load errors. Save settings through config WriteConfigPath for YAML-aware configs.
Print fatal resolver errors and tee slog Error+ to stderr even when log_severity is none, so silent exits are visible in the terminal.
Canonical dnsplane.yaml with startup migration from JSON, nags when both exist, saves always target YAML, and atomic config writes.
Point packaged units and operator docs at YAML as the canonical config file.
Use WriteConfigPath for cluster manager; group stdlib vs third-party imports.
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
dnsplane.yamlwith JSON read/migration and stderr nags when both exist.dnscache.jsonon startup; surface fatals and slog errors on stderr even whenlog_severityis none.dnsplane.yaml.Test plan
go test ./...(local)