Hostname Objects#

The ICE ClusterWare™ platform runs an DNS service to handle the name records needed for compute nodes and that service can be extended to provide other hostname records as well. If a hostname record includes a MAC address, then the ClusterWare system will include it in its DHCP service.

When issuing requests, the UID field in the URL can be either the actual UID of the object or the name of the object as given in the "name" field.

Data Fields#

name
     Required: the name for the host

type
     Required: a string representing the type of DNS record this will be: arec (IPv4),
     aaaarec (IPv6), or srvrec (service)

description
     Optional: a text string with descriptive information

ip
     Required for arec and aaaarec: the IP address associated with this name

mac
     Optional for arec and aaaarec: the MAC address associated with this name; if no
     mac is given, then DHCP will not be configured for this host

target
     Required for srvrec: the target server that is running this service

port
     Required for srvrec: the port that the service is running on

service
     Optional for srvrec: the service name for this SRV record, defaults to the name
     of the record

proto
     Optional for srvrec: the protocol that the service uses:  tcp or udp

weight
     Optional for srvrec: the “weight” given to this SRV record; if multiple SRV records
     exist for the same target, the higher weight will be preferred

priority
     Optional for srvrec: the “priority” given to this SRV record; if multiple SRV
     records exist for the same target, the higher priority will be preferred

domain
     Optional for srvrec: the domain portion of the FQDN; if not specified, it will
     default to whatever the ClusterWare head node is configured with

Additional Endpoints#

An additional endpoint is provided to search the hostnames by UID:

GET /hostnames/bypart/<PART>
     A partial UID can be sent in <PART> and the system will return a list of all
     hostname UIDs that match that partial UID

Example#

Create a hostname record:

curl -X POST https://head1.cluster.local/api/v1/hostnames --data \
    '{"name":"nfsserver","ip":"10.1.1.10"}' \
    -H "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": "e921725181c741fba6f4ec8a027a432f"}

Verify the record’s contents:

curl -X GET https://head1.cluster.local/api/v1/hostname/nfsserver -H \
    "Authorization: Bearer eyJhbGciOiJIUzI1Ni…"
{"success": true, "data": {"type": "arec", "name": "nfsserver", "ip": "10.1.1.10", \
    "last_modified": 1721931565.353962, "last_modified_on": "head23.cluster.local", \
   "last_modified_by": "admin1", "uid": "e921725181c741fba6f4ec8a027a432f"}}