Repository navigation
fix(ops): guarded dev2 Moshpit DNS recovery, rollback and tests - #398
Merged
Merged
Conversation
ThreatCrush Security Scan15 finding(s) HIGH/CRITICAL: 2 | MEDIUM: 9 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
| NAMES = ("moshpit.conf", "00-moshpit.conf") | ||
| CHECK_NAMES = ("github.com", "c0mpute.com") | ||
| LOOPBACK_DNS = re.compile(r"^\s*DNS\s*=\s*(?:127\.0\.0\.1|::1|\[::1\])(?::\d+)?(?:\s|$)", re.I | re.M) | ||
| ROUTE_ALL = re.compile(r"^\s*Domains\s*=\s*(?:\S+\s+)*~\.(?:\s|$)", re.I | re.M) |
5 tasks
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.
Restore dev2 DNS safely after a Moshpit local-resolver conflict
The latest four GitHub Actions deploys to dev2 failed before
deploy-app.shran because SSH port 22 timed out. Example: run 44172958010. Meanwhilemoshcode dns enablecan install a systemd-resolvedDomains=~.override that routes all DNS queries through127.0.0.1:5354; if the Moshpit bridge is unavailable, this can break ordinary DNS. There may also be a second00-moshpit.conffrom the Moshpit proxy installer.This is a recovery tool, NOT a remote deployment. There is no safe SSH-based fix until the server is reachable.
Changes
scripts/dev2-dns-recovery.py: dry-run by default, console-only--applywith root permission. Inspects only recognized Moshpit-owned/etc/systemd/resolved.conf.d/moshpit.confand00-moshpit.conf, rejects symlinks/unrecognized contents, backs up files mode 0600, removes only matching resolver overrides, restartssystemd-resolved, tests two ordinary DNS hostnames, restores original files and restarts resolver if verification fails.Safety
No GitHub Action directly changes dev2 DNS or opens firewall ports. This PR does not disable SSH host key verification, adjust firewall, replace
resolv.conf, or claim to fix upstream IP connectivity. The operator must use trusted console/VNC access and verify the origin of the problem first. If routing/firewall/SSH is broken, that is separate from DNS. Merging a runbook/script alone cannot repair a server that is unreachable from GitHub Actions.Test
Merge after all required Rust/security and recovery-specific CI passes. Related #391.