Repository navigation
fix(schema): require hostnames of at least 2 characters - #429
Merged
Merged
Conversation
This was referenced Sep 23, 2026
Closed
GhostofGoes
marked this pull request as ready for review
September 23, 2026 16:54
GhostofGoes
force-pushed
the
fix-hostname-min-length
branch
from
September 23, 2026 17:01
b3a2e39 to
4f905d1
Compare
Contributor
|
looks good, just a changelog conflict |
GhostofGoes
force-pushed
the
fix-hostname-min-length
branch
from
September 28, 2026 21:50
4f905d1 to
da76818
Compare
Contributor
Author
|
@cmulk resolved |
VyOS and Vyatta validate `system host-name` against `[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9]`, and Windows DNS host names have a 2-character minimum, so a topology node with a 1-character hostname passed schema validation but could not be configured on those guests. Raise the minimum hostname length from 1 to 2 in the v1 and v2 topology schemas and in the topology builder's client-side schemas, and document the reason with links to the VyOS and Microsoft references. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
GhostofGoes
force-pushed
the
fix-hostname-min-length
branch
from
September 29, 2026 03:31
da76818 to
275009f
Compare
cmulk
pushed a commit
that referenced
this pull request
Sep 29, 2026
phenix now rejects 1-character node hostnames because VyOS, Vyatta, and Windows do not accept them. Update the hostname rules and the schema reference to match, and link the VyOS and Microsoft references. Migrated from sandialabs/sceptre-phenix-docs#70. Refs: #429 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Description
Require topology node hostnames to be at least 2 characters long.
Background
The schema allowed 1-character hostnames, but two guest operating systems phenix configures reject them:
system host-nameagainst[A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9], which needs at least 2 characters (VyOS docs, vyos-1x constraint). The same rule applies in legacy Vyatta and in every VyOS release since 1.2.Linux (
hostnamectl) accepts 1-character hostnames. Applying the minimum to every node keeps the rule in one place, and matches the limit the other supported guests already enforce.Changes
minLength: 2and pattern^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$in the v1 and v2 topology schemas, with a comment linking the references above.Related Issues/PRs
Type of Change
fix)feat)docs)refactor)chore)Checklist
Testing
Tested manually on a phenix deployment. Normal topologies work, but a node with a 1-character hostname like
rwill fail validation.Additional Notes
This is a stricter validation rule. A stored config with a 1-character hostname fails validation the next time it is created or updated, until the node is renamed. The topologies in sceptre-phenix-topologies have no 1-character hostnames.
Not covered here: minimega parses an all-numeric VM name as a count (
vm launch kvm 42launches 42 VMs), and the schema still accepts all-numeric hostnames.🤖 Generated with Claude Code