Skip to content

Add DNS records for the smp-py Minecraft server - #19

Merged
shenanigansd merged 2 commits into
mainfrom
claude/pydis-smp-dns-records-3l7koz
Aug 30, 2026
Merged

Add DNS records for the smp-py Minecraft server#19
shenanigansd merged 2 commits into
mainfrom
claude/pydis-smp-dns-records-3l7koz

Conversation

@shenanigansd

Copy link
Copy Markdown
Member

Publishes pydis-smp.letsbuilda.dev as the public entry point for the Minecraft server that ansible/roles/minecraft deploys to microwave. Until now the only name reaching it was microwave.box.letsbuilda.dev, a host record whose purpose is Ansible reachability rather than a player-facing address.

One new file, dns/zones/letsbuilda.dev.zone/services-minecraft.yaml, with three records:

Name Type Value
pydis-smp A 146.190.196.51
pydis-smp AAAA 2604:a880:400:d1:0:4:e490:a001
_minecraft._tcp.pydis-smp SRV 0 5 25565 microwave.box.letsbuilda.dev.

No registration step is needed: split_extension: ".zone" merges every *.yaml in the zone directory, and dns-deploy.yaml is path-filtered on dns/zones/**.

Why it looks like this

The A/AAAA pair repeats microwave.box's addresses rather than aliasing it. A CNAME would be the DRY option, but RFC 2782 forbids an SRV target from resolving through one, and address records keep that door open. The cost is that renumbering microwave.box now has to touch this file too. Both are unproxied for the same reason as 0d1dcd3 — Cloudflare's HTTP proxy does not carry TCP/25565.

The SRV record changes nothing today. The server is on the default 25565, so clients already reach it without one. It is here so the port can move later without players changing what they type.

Its target keeps a trailing dot deliberately. octodns-cloudflare builds the Cloudflare payload with value.target[:-1], stripping the last character unconditionally, so a missing dot would silently push microwave.box.letsbuilda.de. Nothing in the enabled validator set catches this — production.yaml sets no manager.validators, so only the legacy set runs, and the trailing-dot check lives in best-practice.

The SRV carries no proxied key. SRV is not in _PROXIABLE_RECORD_TYPES, so Cloudflare never echoes one back; setting it would diff forever.

ansible/ is untouched — the inventory should keep pointing at microwave.box, since that name addresses the machine and pydis-smp addresses the service.

Verification

Run locally against the exact locked versions (octodns 1.22.0, octodns-cloudflare 1.2.0):

  • octodns-validate --config-file=dns/production.yaml — exit 0, no warnings. Runs fully offline; the Cloudflare provider makes no network calls at construction, so dummy env vars suffice.
  • Loaded the zone and dumped the generated Cloudflare payload. The SRV splits correctly into service=_minecraft, proto=_tcp, name=pydis-smp, with target emitted as microwave.box.letsbuilda.dev — TLD intact.
  • Round-tripped all three records through the provider's read path: no diff, so auto-ttl on the SRV will not produce a recurring no-op update.
  • Applicable pre-commit hooks pass: check-yaml, trailing-whitespace, end-of-file-fixer, mixed-line-ending, check-case-conflict, check-merge-conflict. (yamlfix excludes ^dns.)

The dry-run workflow should plan exactly three Creates and no modifications or deletions.

After merge

  • dig +short pydis-smp.letsbuilda.dev A AAAA
  • dig +short _minecraft._tcp.pydis-smp.letsbuilda.dev SRV0 5 25565 microwave.box.letsbuilda.dev.
  • Connect a client to pydis-smp.letsbuilda.dev with no port and confirm the MOTD.

Unrelated note

yamlfix crashes at import under Python 3.14rc2 (a pydantic eval_type_backport assertion). It is excluded from ^dns so it does not affect this change, but it may be worth a look if lint goes red for reasons unconnected to this diff.


Generated by Claude Code

Publish pydis-smp.letsbuilda.dev as the public entry point for the
Minecraft server that ansible/roles/minecraft deploys to microwave. Until
now the only name reaching it was microwave.box.letsbuilda.dev, a host
record whose purpose is Ansible reachability rather than a player-facing
address.

The A/AAAA pair repeats microwave.box's addresses rather than aliasing
it. A CNAME would be the DRY option, but RFC 2782 forbids an SRV target
from resolving through one, and address records keep that door open. The
cost is that renumbering microwave.box now has to touch this file too.
Both are unproxied for the same reason as 0d1dcd3: Cloudflare's HTTP
proxy does not carry TCP/25565.

The SRV record changes nothing today -- the server is on the default
25565, so clients already reach it without one. It is here so the port
can move later without players changing what they type. Its target keeps
a trailing dot deliberately: octodns-cloudflare builds the Cloudflare
payload with value.target[:-1], stripping the last character
unconditionally, so a missing dot would silently push a truncated
hostname. Nothing in the enabled validator set catches that. The record
carries no proxied key because SRV is not a proxiable type, and setting
one would diff against Cloudflare forever.

The Ansible inventory deliberately keeps pointing at microwave.box: that
name addresses the machine, pydis-smp addresses the service.

Claude-Session: https://claude.ai/code/session_01L67LcrLn6ohbfwGbKtBEge

Co-authored-by: Claude <noreply@anthropic.com>
@shenanigansd
shenanigansd requested a review from a team as a code owner August 30, 2026 00:09
@github-actions

github-actions Bot commented Aug 30, 2026

Copy link
Copy Markdown

OctoDNS Plan for claude/pydis-smp-dns-records-3l7koz

letsbuilda.dev.

cloudflare

Operation Name Type TTL Value Source
Create _minecraft._tcp.smp-py SRV 300 '0 5 25565 microwave.box.letsbuilda.dev.' zone_config
Create smp-py A 300 146.190.196.51 zone_config
Create smp-py AAAA 300 2604:a880:400:d1:0:4:e490:a001 zone_config

Summary: Creates=3, Updates=0, Deletes=0, Existing=11, Meta=False

@maxillum

This comment was marked as abuse.

@shenanigansd shenanigansd changed the title Add DNS records for the pydis-smp Minecraft server Add DNS records for the smp-py Minecraft server Aug 30, 2026
Signed-off-by: Bradley Reynolds <bradley.reynolds@tailstory.dev>
@shenanigansd
shenanigansd merged commit 33cb842 into main Aug 30, 2026
5 checks passed
@shenanigansd
shenanigansd deleted the claude/pydis-smp-dns-records-3l7koz branch August 30, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants