Skip to content

Free-form hostname support for OpenCHAMI DNS configuration - #5806

Draft
VrindaMarwah wants to merge 1 commit into
dell:stagingfrom
VrindaMarwah:staging
Draft

VrindaMarwah wants to merge 1 commit into
dell:stagingfrom
VrindaMarwah:staging

Conversation

@VrindaMarwah

Copy link
Copy Markdown
Collaborator

Description of the Solution

This PR adds support for human-readable custom hostnames (e.g., gpu-worker-01, login-server) alongside the standard nid format (nid001-nid999) when dns_enabled: true in orchestrator_config.yml. The system auto-detects the hostname format from the PXE mapping file and configures DHCP (CoreDHCP) and DNS (CoreDNS) accordingly, following the OpenCHAMI custom hostname management approach to keep DHCP, DNS, and cloud-init in agreement.

Related Issue

Changes

Documentation (src/orchestrator/docs/)

  • Updated input contract to document custom hostname validation rules
  • Added comprehensive custom-hostnames.md with configuration examples, implementation details, and testing instructions

Configuration (src/orchestrator/input/orchestrator_config.yml)

  • Updated dns_enabled comment to reflect support for both nid and custom hostname formats

Validation (src/orchestrator/plugins/module_utils/orchestrator_validation/)

  • Updated hostname validation error message to indicate both formats are allowed
  • Modified PXE mapping validator to accept any valid hostname when dns_enabled is true (removed strict nid pattern enforcement)

OpenCHAMI Deployment (src/orchestrator/roles/deploy_openchami/)

  • Added PXE mapping file loading in ochami.yml and refresh_openchami_configs.yml
  • Updated coredhcp.yaml.j2 template to add MAC-based hostname rules for custom hostnames before the general nid pattern
  • Updated Corefile.j2 template to create separate DNS server blocks for custom hostnames using the hosts plugin

Files Changed

File Change Type Description
src/orchestrator/docs/contracts/input-contract.md Modified Updated HOSTNAME field description to include custom hostname support
src/orchestrator/docs/custom-hostnames.md Added Comprehensive documentation for custom hostname feature
src/orchestrator/input/orchestrator_config.yml Modified Updated dns_enabled configuration comments
src/orchestrator/plugins/module_utils/orchestrator_validation/messages/orchestrator_messages.py Modified Updated DNS hostname validation error me
ssage
src/orchestrator/plugins/module_utils/orchestrator_validation/validators/pxe_mapping_validator.py Modified Removed strict nid pattern enforcemen
t, allow any valid hostname
src/orchestrator/roles/deploy_openchami/tasks/configs/ochami.yml Modified Added PXE mapping file loading for custom hostname support
src/orchestrator/roles/deploy_openchami/tasks/refresh_openchami_configs.yml Modified Added PXE mapping file loading for config refresh
src/orchestrator/roles/deploy_openchami/templates/coredhcp/coredhcp.yaml.j2 Modified Added MAC-based hostname rules for custom hostnames
src/orchestrator/roles/deploy_openchami/templates/coredns/Corefile.j2 Modified Added separate DNS server blocks for custom hostnames

Testing

  • Manual verification: Deployed cluster with custom hostnames in PXE mapping file, verify DHCP offers correct hostname via journalctl -u dhclient, query DNS with dig @<oim-ip> <hostname>.<domain> A +short, and confirm hostname is set on the node after cloud-init.

Backward Compatibility

  • No breaking changes. The feature is backward compatible as it adds support for custom hostnames on top of existing, optional nid-hostname format.

Signed-off-by: Vrinda_Marwah <Vrinda.Marwah@dell.com>

This branch has not been deployed

No deployments
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