Getting "Invalid DNS name present in master DNS name list" when trying to update additional "--master-dns-names" for the supervisor control plane VMs'.
search cancel

Getting "Invalid DNS name present in master DNS name list" when trying to update additional "--master-dns-names" for the supervisor control plane VMs'.

book

Article ID: 391065

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • Adding an additional master DNS name for the supervisor cluster via "dcli com vmware vcenter namespacemanagement clusters update" error out with "Invalid DNS name present in master DNS name list".  For example, when trying to add a second DNS name "test.locallabs.local" on top of the existing one which is "test2.locallabs.local" using a comma separated keyword, you get the below error.

    root@vcsa01 [ ~ ]# dcli com vmware vcenter namespacemanagement clusters update --cluster domain-c# --master-dns-names test2.localabs.local,test.locallabs.local

    Server error: com.vmware.vapi.std.errors.InvalidArgument

    Error message:

        Invalid DNS name present in master DNS name list (test2.locallabs.local,test.locallabs.local)

 

  • The output of the said command when checking the current "Master DNS names" for the supervisor control plane VMs' would be a single DNS name.

    root@vcsa01 [ ~ ]# dcli com vmware vcenter namespacemanagement clusters get --cluster domain-c# | grep -A 2 Master_DNS_names

    Master_DNS_names:

      - test2.locallabs.local

         root@vcsa01 [ ~ ]#

Environment

vSphere with Tanzu 7.x
vSphere with Tanzu 8.x

Cause

This is because all the elements in the list are being passed as a single DNS name. When a list of DNS names is passed while enabling WCP, all names in the list are parsed as a single DNS name which leads to failure during DNS name validation and WCP enablement.

Resolution

The fix is to pass each DNS name as a separate argument instead of a list. Use the following DCLI command to update an additional FQDNs for the Supervisor control plane on top of the existing one.

    dcli com vmware vcenter namespacemanagement clusters update --cluster <cluster_ID> --master-dns-name <FQDN 1> --master-dns-name <FQDN_2>

 

For example, if the first dns-name is test2.locallabs.local and the second dns-name you're trying to add is test.locallabs.local, then the command would be as below.

    root@vcsa01 [ ~ ]# dcli com vmware vcenter namespacemanagement clusters update --cluster domain-c# --master-dns-names test2.locallabs.local --master-dns-names test.locallabs.local

 

To confirm run the below command and you should see the expected output as below.

     root@vcsa01 [ ~ ]# dcli com vmware vcenter namespacemanagement clusters get --cluster domain-c# | grep -A 2 Master_DNS_names

       Master_DNS_names:
        - test2.locallabs.local
        - test.locallabs.local

    root@vcsa01 [ ~ ]#

Additional Information