Skip to content

fix(deploy): publish an Android-resolvable CNAME for tee.node.tinycloud.xyz (TC-513) - #241

Merged
samgbafa merged 1 commit into
mainfrom
fix/tc-513-android-dns
Oct 4, 2026
Merged

samgbafa merged 1 commit into
mainfrom
fix/tc-513-android-dns

Conversation

@samgbafa

@samgbafa samgbafa commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Linear: TC-513

tee.node.tinycloud.xyz is a CNAME to _.dstack-pha-prod5.phala.network. Android's resolver (bionic res_hnok) rejects a CNAME target whose first label is _, so on Android the name doesn't resolve: ERR_NAME_NOT_RESOLVED in WebView and in native code. Exo on Android can't reach the TinyCloud node.

The prod dstack-ingress sidecar (docker-compose.dstack-postgres.yaml) is the component that writes this CNAME. In dstacktee/dstack-ingress:20250924 the bootstrap runs dnsman.py set_alias --content "$GATEWAY_DOMAIN" every time a container is created fresh, because /.bootstrapped lives in the container layer. That call deletes and recreates any CNAME whose content differs. A hand edit would therefore be undone by the next release deploy, and the compose has to change too.

This PR sets GATEWAY_DOMAIN=gateway.${DSTACK_GATEWAY_DOMAIN}. That is the target the Phala Cloud API advertises for this CVM: phala cvms get tinycloud-node gives gateway.cname = gateway.dstack-pha-prod5.phala.network. Upstream dstack-ingress has documented the same form since Dstack-TEE/dstack-examples#123. The name resolves to the same gateway IP, and the gateway still routes on SNI plus _dstack-app-address with TLS passthrough. TLS and the cert stay inside the CVM.

Evidence, without any DNS change:
curl -sv https://tee.node.tinycloud.xyz/info --connect-to tee.node.tinycloud.xyz:443:gateway.dstack-pha-prod5.phala.network:443 returned 200 (version 1.17.2, inTEE: true), cert CN=tee.node.tinycloud.xyz (LE YE2, valid to 2026-12-24), verify ok.

Release line

Production runs 1.17.2 from Codex/roman/rollback-meeting-node-20260915. main is 1.16.x. Merging to main by itself doesn't deploy, and a deploy from main would roll production back. Cherry-pick this commit onto the 1.17.x line, i.e. the 1.17.3 release in #239 (skgbafa/tc-529-node-1.17.3). The compose file is identical there, so the pick applies cleanly.

Rollout (needs Sam's go-ahead)

  1. In the Cloudflare tinycloud.xyz zone, edit the existing tee.node.tinycloud.xyz CNAME in place: content gateway.dstack-pha-prod5.phala.network, DNS only. Editing in place means no NXDOMAIN gap.
  2. Run dig +short CNAME tee.node.tinycloud.xyz @1.1.1.1 and curl -sf https://tee.node.tinycloud.xyz/info.
  3. Ship this change with the next 1.17.x release. Until then, any deploy that recreates the ingress resets the CNAME to _.…, which breaks Android again but doesn't cause an outage.

Rollback: set the CNAME back to _.dstack-pha-prod5.phala.network and revert. Both names point at the same gateway.

…ud.xyz (TC-513)

The dstack-ingress sidecar CNAMEs DOMAIN to GATEWAY_DOMAIN on every fresh
container start. It was _.${DSTACK_GATEWAY_DOMAIN}; Android's resolver
(bionic res_hnok) rejects a CNAME target whose first label is '_', so
tee.node.tinycloud.xyz does not resolve on Android (WebView and native).

Use gateway.${DSTACK_GATEWAY_DOMAIN}: the CNAME target Phala Cloud
advertises for this CVM (gateway.cname) and upstream dstack-ingress
documents since Dstack-TEE/dstack-examples#123. It resolves to the same
gateway IP; the gateway still routes by SNI + the _dstack-app-address TXT
record, so TLS remains terminated inside the CVM.
@samgbafa

samgbafa commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Status update (TC-605):

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.

1 participant