Cluster DNS¶
Overview¶
Cluster DNS is an optional Orchestrator capability that makes OpenCHAMI SMD
inventory available through the coresmd CoreDNS plugin. The current
Orchestrator input sets dns_enabled: false by default.
When Cluster DNS is enabled, Orchestrator configures provisioned nodes to query
the OIM admin address for the Omnia cluster domain. For service Kubernetes, the
generated control-plane cloud-init also adds a Kubernetes CoreDNS forward zone
for that domain. When Cluster DNS is disabled, the node cloud-init templates
append the generated peer mapping to /etc/hosts instead.
Cluster DNS is owned by the Orchestrator deployment module. See Configure Cluster DNS for the task-oriented procedure.
Prerequisites¶
- Complete the common OIM setup and stage the Orchestrator inputs.
- Provide a valid
pxe_mapping_file.csvand the successful Repository Manager and Image Build Manager outputs required by Orchestrator. - Configure
SYSTEM_ADMIN_NIC_IPV4andSYSTEM_DOMAIN_NAMEfor the OIM. - In
network_spec.yml, configure reachable DNS forwarders inNetworks.admin_network.dns. The generated Corefile forwards queries outside the Omnia cluster zone to these addresses. - Ensure managed nodes and service Kubernetes nodes can reach TCP and UDP port
53 on the OIM admin address. The OpenCHAMI deployment opens both ports in
firewalld.
Source-defined behavior¶
The generated OpenCHAMI Corefile:
- binds DNS to the cluster boot/admin address;
- exposes CoreDNS Prometheus metrics on port
9153; - queries SMD through the configured OpenCHAMI endpoint and CA certificate;
- refreshes the SMD data cache every 30 seconds;
- serves the cluster domain recorded from the OIM environment; and
- generates node records using the fixed
nidshort name and a three-digit node identifier.
When dns_enabled: true, Orchestrator input validation requires every PXE
mapping hostname to use the nidNNN form from nid001 through nid999.
During node registration, each generated per-category file, such as
nodes_slurm.yaml or nodes_kubernetes.yaml, derives the numeric node ID from
that suffix. Custom hostnames are supported only when Cluster DNS is disabled;
in that mode, node cloud-init uses the generated /etc/hosts mapping instead.
When Orchestrator provisions a target category with Cluster DNS enabled, it:
- writes
/etc/resolv.confcontent into applicable node cloud-init with the cluster domain search suffix and OIM admin address; - updates the OIM resolver to place the cluster domain and OIM nameserver first;
- marks the OIM
/etc/resolv.confimmutable to prevent NetworkManager from overwriting it; and - adds a service Kubernetes CoreDNS forward block for the cluster domain when service Kubernetes is selected.
Enable Cluster DNS¶
-
Edit the staged Orchestrator configuration:
Run on: OIM hostsource /etc/profile.d/omnia-env.sh orchestrator_path="${OMNIA_DATA_PATH}/orchestrator" vi "${orchestrator_path}/input/${OMNIA_PROJECT_NAME}/orchestrator_config.yml" -
Enable the source-defined option:
dns_enabled: true -
Validate the complete Orchestrator input contract:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run orchestrator --tags validateRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks ansible-playbook orchestrator.yml --tags validate -
Prepare Orchestrator. This deploys and validates OpenCHAMI and its generated CoreDNS configuration:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run orchestrator --tags prepareRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks ansible-playbook orchestrator.yml --tags prepare -
Provision the selected functional groups so that Orchestrator generates the updated node metadata and resolver configuration:
Run on: OIM hostcd <OMNIA_SOURCE_PATH>/src/main ./omnia.sh --run orchestrator --tags provisionRun on: OIM hostsource /opt/omnia/activate-omnia.sh cd <OMNIA_SOURCE_PATH>/src/orchestrator/playbooks ansible-playbook orchestrator.yml --tags provisionUse
--tags executeinstead when the same invocation should perform the complete provision flow and the conditional iDRAC PXE-boot phase. -
New resolver content is applied to a stateless node when it consumes the updated cloud-init during provisioning. Reprovision existing nodes when they must receive the new resolver configuration.
Verification¶
-
Verify the OpenCHAMI target on the OIM:
Run on: OIM hostsystemctl is-active openchami.target systemctl list-dependencies openchami.target -
Query an SMD-derived name directly from the OIM DNS address:
Run on: OIM hostdig nid001.<SYSTEM_DOMAIN_NAME> @<SYSTEM_ADMIN_NIC_IPV4>Confirm that the answer contains the expected node admin address.
-
Verify the resolver on a newly provisioned node:
Run on: provisioned nodecat /etc/resolv.conf getent hosts nid001.<SYSTEM_DOMAIN_NAME>The resolver content generated by Orchestrator contains the cluster domain search suffix, the OIM admin address as nameserver, and
options timeout:1 attempts:2. -
When service Kubernetes is present, inspect its CoreDNS ConfigMap:
Run on: service Kubernetes control planekubectl -n kube-system get configmap coredns -o yamlConfirm that it contains a forward block for
<SYSTEM_DOMAIN_NAME>whose target is<SYSTEM_ADMIN_NIC_IPV4>.
Disable Cluster DNS¶
- Set
dns_enabled: falsein the stagedorchestrator_config.yml. - Run Orchestrator validation and provisioning again.
- Reprovision stateless nodes that must return to the
/etc/hostscontent generated by their updated cloud-init.
Disabling the option changes client configuration. The OpenCHAMI deployment still contains its generated CoreDNS service and firewall rules.
Troubleshooting¶
- The DNS query times out: Verify
openchami.target, TCP and UDP port 53, and reachability of the OIM admin address from the affected node. - The cluster name resolves to an unexpected node: Compare the mapping hostnames with the node IDs registered in SMD. The CoreDNS record is based on the SMD node ID, not an arbitrary custom hostname.
- External names do not resolve: Check the DNS addresses in
Networks.admin_network.dnsand verify that the OIM can reach them. - An existing node still uses
/etc/hosts: Confirm that the node consumed the regenerated cloud-init afterdns_enabledwas changed. - Manual changes to the OIM resolver fail: The provisioning task applies
the immutable flag to
/etc/resolv.conf. Manage the setting through the Orchestrator flow so that the source-defined resolver content is reapplied. - Kubernetes pods cannot resolve the cluster domain: Verify the CoreDNS ConfigMap forward block and confirm that pods can reach port 53 on the OIM admin address.