DNS resources provide DNS-based failover by updating DNS records when a cluster failover occurs. The DNS resource updates the IP address associated with a hostname in one or more DNS servers, allowing clients to reconnect to the new active node by re-resolving the hostname.

Resource Type: comm/dns
Aliases: dns

Subcommands

DNS resources are managed by commands of the form:

lkcli resource comm/dns <subcommand> [flags]

Subcommand Description Required Role
create Create a new DNS resource admin
extend Extend to a standby server admin
get-property Read a resource property guest
set-property Update an editable resource property admin

create

lkcli resource comm/dns create \
  --dns-password=<string> --dns-servers-list=<array> --dns-username=<string> [flags]

Flag Short Type Required Default Constraints Description
--host-name string No Host name of local server Host name whose A and PTR records should be updated
--ip-address string No Primary IPv4 address of local server IP address used in the A record for the protected host name
--dns-password string Yes Password for DNS server authentication
--dns-servers-list array Yes Comma-separated list of DNS server hostnames or IP addresses
--dns-username string Yes Username for DNS server authentication
--deepcheck-interval int No 300 min: 0, max: 604800 Deepcheck interval in seconds
local-recovery enum No enabled enabled, disabled Enable local recovery
--tag string No Auto-generated Resource tag name
--switchback enum No INTELLIGENT INTELLIGENT, AUTOMATIC Switchback type

extend

lkcli resource comm/dns extend \
  --dns-servers-list=<array> --primary-sys=<string> --primary-tag=<string> [flags]

Flag Short Type Required Default Constraints Description
--ip-address string No Primary IPv4 address of standby server IP address used in the A record for the protected host name on standby server
--dns-servers-list array Yes DNS server list for the standby server
--primary-sys string Yes Hostname of the server the existing resource is extended from
--primary-tag string Yes Tag of the existing resource to extend
--standby-sys string No Value of --host (defaults to localhost) Hostname of the standby server
--switchback enum No INTELLIGENT INTELLIGENT, AUTOMATIC Switchback type
--primary-priority int No Defaults to the current priority of the --primary-sys server, or 1 if the resource has not yet been extended min: 1, max: 999 Failover priority for the primary server
--standby-priority int No Defaults to an unused value which is computed dynamically based on the priority values currently in-use min: 1, max: 999 Failover priority for the standby server

get-property / set-property

lkcli resource comm/dns get-property --tag=<string> --property=<string>
lkcli resource comm/dns set-property --tag=<string> --property=<string> --value=<string>

Flag Short Type Required Description
--tag -t string Yes Resource tag name
--property -p string Yes Property name (see Properties table below)
--value -v string Yes (set-property only) New property value

Properties

Property Type Constraints Editable Description
host-name string No The DNS hostname managed by this resource
server-ip-map object No Mapping of cluster node hostnames to their IP addresses
dns-servers-list array Yes List of DNS server hostnames or IP addresses
dns-server-auth object Yes DNS server authentication credentials object
deepcheck-interval int min: 0, max: 604800 Yes Deepcheck interval in seconds (default: 300)
local-recovery enum enabled, disabled Yes Enable local recovery
switchback enum INTELLIGENT, AUTOMATIC Yes Switchback type
kit-name string No Recovery kit name

Example Usage

# Create a DNS resource
lkcli resource comm/dns create \
  --host=server1 \
  --host-name=myvirtualhost \
  --dns-servers-list="dns1.example.com,dns2.example.com" \
  --dns-username=DOMAIN\dnsadmin \
  --dns-password=secret \
  --tag=dns-mycluster

# Extend to server2
lkcli resource comm/dns extend \
  --primary-sys=server1 \
  --primary-tag=dns-mycluster \
  --dns-servers-list="dns1.example.com,dns2.example.com" \
  --standby-sys=server2

# Update the DNS servers list
lkcli resource comm/dns set-property \
  --host=server1 \
  --tag=dns-mycluster \
  --property=dns-servers-list \
  --value="dns1.example.com,dns3.example.com"

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment