[PR #19] [MERGED] fix: ensure container names don't exceed 63-character DNS label limit #50

Closed
opened 2026-10-18 21:13:48 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/terminals/pull/19
Author: @james-westbrook
Created: 4/3/2026
Status: ✅ Merged
Merged: 4/3/2026
Merged by: @tjbck

Base: main ← Head: fix-orchestrator-dns-names


📝 Commits (2)

  • 1951b21 fix: ensure container names don't exceed 63-character DNS label limit
  • e474360 Merge branch 'main' into fix-orchestrator-dns-names

📊 Changes

4 files changed (+1124 additions, -863 deletions)

View changed files

📝 pyproject.toml (+1 -1)
📝 terminals/backends/docker.py (+9 -2)
📝 terminals/backends/kubernetes.py (+9 -6)
📝 uv.lock (+1105 -854)

📄 Description

Description

The Terminals orchestrator names spawned Open Terminal containers using the pattern terminals-{policy_id}-{user_id}, which produces hostnames ~85 characters long. This exceeded the 63-character DNS label limit (RFC 952/1123), causing all proxy requests to fail with Name or service not known.

This PR updates container name to use partial hashes instead of full user UUIDs, maxing the DNS label out at ~42 characters, well beneath the DNS label limit.

Testing

Validation on Kind cluster:

  • Built image, loaded into Kind, deployed with Kubernetes backend
  • Created a policy, provisioned a terminal with UUID user ID
  • Pod name: terminal-98b0b3bcd572-dns-test-policy (37 chars, well within 63)
  • Proxy routing via service DNS: working (HTTP 200, command execution successful)
  • Ran same testing with Docker backend to ensure consistent results

Closes https://github.com/open-webui/terminals/issues/18


Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/terminals/pull/19 **Author:** [@james-westbrook](https://github.com/james-westbrook) **Created:** 4/3/2026 **Status:** ✅ Merged **Merged:** 4/3/2026 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `fix-orchestrator-dns-names` --- ### 📝 Commits (2) - [`1951b21`](https://github.com/open-webui/terminals/commit/1951b21c89ce6f804d84fe88e3004de275944e01) fix: ensure container names don't exceed 63-character DNS label limit - [`e474360`](https://github.com/open-webui/terminals/commit/e474360dcc4a324aae7ea0528b3e033efa8198b6) Merge branch 'main' into fix-orchestrator-dns-names ### 📊 Changes **4 files changed** (+1124 additions, -863 deletions) <details> <summary>View changed files</summary> 📝 `pyproject.toml` (+1 -1) 📝 `terminals/backends/docker.py` (+9 -2) 📝 `terminals/backends/kubernetes.py` (+9 -6) 📝 `uv.lock` (+1105 -854) </details> ### 📄 Description ## Description The Terminals orchestrator names spawned Open Terminal containers using the pattern `terminals-{policy_id}-{user_id}`, which produces hostnames ~85 characters long. This exceeded the 63-character DNS label limit (RFC 952/1123), causing all proxy requests to fail with `Name or service not known`. This PR updates container name to use partial hashes instead of full user UUIDs, maxing the DNS label out at ~42 characters, well beneath the DNS label limit. ## Testing Validation on Kind cluster: - Built image, loaded into Kind, deployed with Kubernetes backend - Created a policy, provisioned a terminal with UUID user ID - Pod name: `terminal-98b0b3bcd572-dns-test-policy` (37 chars, well within 63) - Proxy routing via service DNS: working (HTTP 200, command execution successful) - Ran same testing with Docker backend to ensure consistent results ## Related Issues Closes https://github.com/open-webui/terminals/issues/18 --- ## Contributor License Agreement <!-- 🚨 DO NOT DELETE THE TEXT BELOW 🚨 Keep the "Contributor License Agreement" confirmation text intact. Deleting it will trigger the CLA-Bot to INVALIDATE your PR. Your PR will NOT be reviewed or merged until you check the box below confirming that you have read and agree to the terms of the CLA. --> - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](./CLA.md), and I am providing my contributions under its terms. > [!NOTE] > Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-18 21:13:48 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
open-webui/terminals#50
No description provided.