vmware / nsx-t-datacenter-ci-pipelines

CI pipelines for VMware NSX-T Datacenter
Other
71 stars 43 forks source link

NSX-T 2.4 nsxt-controller-manager node fails when more than one DNS servers is specified #34

Closed louis-lam closed 5 years ago

louis-lam commented 5 years ago

When deploying using the unified_appliance branch, it's failing at nsxt_controller_manager_auto_deployment.py when I have more than one DNS server specified. With debugging turned on, I see that it's trying to pass the dns server values like this:

failed: [localhost] (item=controller-1) => {
    "changed": false, 
    "invocation": {
        "module_args": {
            "deployment_requests": [
                {
                    "deployment_config": {
                        "compute_id": "domain-c7", 
                        "default_gateway_addresses": [
                            "10.193.219.1"
                        ], 
                        "dns_servers": [
                            "10.192.2.10,10.192.2.11"
                        ], 

The dns servers came from the config file and worked fine when the NSX Manager deployment via the OVA. The problem appears to come from /tasks/install-nsx-t/task.sh line 78-80

    # DNS server needs to be specified for static IPs
    DNS_SERVER="\"{{hostvars[\'localhost\'].dns_server}}\""
    sed -i "/hostvars\[item\].prefix_length/a \ \ \ \ \ \ \ \ \ \ \ \ dns_servers: [$DNS_SERVER]" basic_topology.yml
Dyanngg commented 5 years ago

Hi @lamlouis Thanks for raising this issue. It is fixed now in latest commit on 'unified_appliance' branch.

louis-lam commented 5 years ago

I tried the new nsxt_2.4.0 branch and still got the same error. The input config I'm using is dns_server: 10.192.2.10,10.192.2.11.

rbales79 commented 5 years ago

Add a space between the comma and your second DNS Server

Dyanngg commented 5 years ago

@lamlouis I have uploaded new patch, now dns_server: 10.192.2.10,10.192.2.11 or dns_server: 10.192.2.10, 10.192.2.11 should both work. Thanks.