ansible-for-nsxt icon indicating copy to clipboard operation
ansible-for-nsxt copied to clipboard

Unable to create a T0vrf construct (T0 gateway is already there)

Open riay00 opened this issue 1 year ago • 0 comments

Describe the bug

Trying to create a A/S T0vrf. The T0 gateway is pre-deployed so the playbook needs to create a T0vrf construct but it fails following error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Received 400 from NSX Manager. Please try again. Json de-serialization error: property display_name is unrecognized."}

I tried to change, remove, add different combinations but still same. I assume this is related to the display_name under vrf_config?! I changed it to id but same error. Am I missing something here or is it a bug?


  • hosts: localhost vars_files:

    • /opt/indra/ansible/playbooks/secret.yml

    tasks:

    • name: Create Tier-0 Gateway interfaces and configure HA VIP vmware.ansible_for_nsxt.nsxt_policy_tier0: hostname: "{{ TB4_NSXM }}" username: "{{ robotID }}" password: "{{ tcadPASS }}" validate_certs: False state: present id: "sescy264-t0-evm-01" ha_mode: "ACTIVE_STANDBY" failover_mode: "NON_PREEMPTIVE" disable_firewall: True force_whitelisting: True locale_services: - state: present id: "test-t0ls" edge_cluster_info: edge_cluster_id: "d634322b-8cd5-4137-9a56-8a937279d663" preferred_edge_nodes_info: - edge_cluster_id: "d634322b-8cd5-4137-9a56-8a937279d663" edge_node_id: "e34959a4-efc4-40ec-9d10-f6cff41d451c" interfaces: - id: "test-t0-t0ls-iface" state: present subnets: - ip_addresses: ["90.239.32.1"] prefix_len: 29 segment_id: "test-t0vrf-ansible" edge_node_info: edge_cluster_id: "d634322b-8cd5-4137-9a56-8a937279d663" edge_node_id: "e34959a4-efc4-40ec-9d10-f6cff41d451c" mtu: 1500 urpf_mode: "NONE" ipv6_ndra_profile_display_name: "default" vrf_config: display_name: "sescy264-t0vrf-ansible" tier0_id: "sescy264-t0-evm-01" route_targets: - id: "test-resource" export_route_targets: - "65530:264999" import_route_targets: - "65530:264999" tags: - scope: "deployment" tag: "ansible" route_distinguisher: '65530:264999' evpn_transit_vni: 264999

Reproduction steps

  1. run the ansible playbook

...

Expected behavior

throws an error:

[riay00@nfvi_tb_jh]/opt/indra/ansible/playbooks/caas_t0_create% sudo ansible-playbook create_t0_gateway.yml [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

PLAY [localhost] ***********************************************************************************************************************************************************************

TASK [Gathering Facts] ***************************************************************************************************************************************************************** ok: [localhost]

TASK [Create Tier-0 Gateway interfaces and configure HA VIP] *************************************************************************************************************************** fatal: [localhost]: FAILED! => {"changed": false, "msg": "Received 400 from NSX Manager. Please try again. Json de-serialization error: property display_name is unrecognized."}

PLAY RECAP ***************************************************************************************************************************************************************************** localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Additional context

No response

riay00 avatar Dec 30 '24 08:12 riay00