021-02-03T13:07:59.551Z nsxmgr01 NSX 1254 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="78cd8f71-####-####-####-db165f19f460" subcomp="policy" update="true" username="user"] UserName="User", ModuleName="FirewallFilter", Operation="GetSectionsByFilter", Operation status="failure", New value=[{"resource_type":"SecurityPolicy","sort_by":"internal_sequence_number,unique_id","sort_ascending":true,"cursor":"0","page_size":100} {"primary":{"resource_type":"GatewayPolicy","filters":[{"field_names":"path","value":"\\/infra\\/domains\\/default\\/gateway\\-policies\\/Policy_Default_Infra OR \\/infra\\/domains\\/default\\/gateway\\-policies\\/Block_All OR \\/infra\\/domains\\/default\\/gateway\\-policies\\/Temp"}]},"related":[{"join_condition":"path:parent_path","size":1,"alias":"domains","resource_type":"Domain"}],"filters":[{"filter_column":"SCOPE","filter_value":["\\/infra\\/tier\\-0s\\/T0\\-vrf\\-dc"]}]}]2021-02-03T13:07:59.551Z nsxmgr01 NSX 1254 SYSTEM [nsx@6876 comp="nsx-manager" errorCode="MP100" level="ERROR" subcomp="policy"]2021-02-03T13:07:59.553Z nsxmgr01 NSX 1254 SYSTEM [nsx@6876 audit="true" comp="nsx-manager" level="INFO" subcomp="policy"] UserName:'<username>' ModuleName:'common-services' Operation:'POST@/api/v1/ui/firewall/sections' Operation status: 'failure' Error: General error has occurred.
VMware NSX-T Data Center 2.x
VMware NSX-T Data Center 3.x
Search APIs were not case sensitive before NSX-T 3.2, causing incorrect information or errors to be displayed in the UI for objects with the same name with different casing. For example:
This happens when you add a Gateway Firewall policy that has the same name as another Gateway Firewall policy, these names are not case sensitive.
To check and validate this you can run the following REST API calls, which will return all the Gateway Firewall policies:
GET https://<nsx-manager-ip>/api/v1/firewall/sections- MP APIGET https://<nsx-manager-ip>/policy/api/v1/infra/domains/default/gateway-policies- Policy API
In this example below, you can see the names are the same, although the case is different.
LR-01 rules:{"_create_time": 1624283819508,- Monday, June 21, 2021 1:56:59.508 PM"_create_user": "nsx_policy",...{"scope": "policyPath","tag": "/infra/domains/default/gateway-policies/block_all"-> same policy name as LR-02}],"tcp_strict": true},
For LR-02{"_create_time": 1623248861241,- Wednesday, June 9, 2021 2:27:41.241 PM"_create_user": "nsx_policy",...{"scope": "policyPath","tag": "/infra/domains/default/gateway-policies/Block_All"-> same policy name as LR-01}],"tcp_strict": true},
This issue is resolved in VMware NSX-T Data Center 3.2 and later releases.
Workaround:
GET https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_all/rulesDELETE https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_all/rules/<rule id>DELETE https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_allGET https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_allPR 2594730 2718942 2785041 3229789
This issue affects other objects such as Groups as well, where the search API will incorrectly return the same results for both lower and uppercase objects:
Example:/infra/domains/default/groups/examplegroup01 /infra/domains/default/groups/EXAMPLEGROUP01