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"] User
Name="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 {
"_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
},
{
"_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:
Use REST API's to delete one of the security policies and create a new one with a different name.
Get all rules under the policy you intend deleting:
GET https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_all/rules
In order to remove the policy, we need to remove these rules, use the following REST API to delete any rules identified from above API, by adding each rule ID below:
DELETE https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_all/rules/<rule id>
Once all the rules are removed, you can remove the policy:
DELETE https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_all
Check the policy has been removed:
GET https://<NSX-Manager-IP>/policy/api/v1/infra/domains/default/gateway-policies/block_all
Now the GUI should work properly and you can create the policy, using a different name.
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:
Ex:/infra/domains/default/groups/examplegroup01
/infra/domains/default/groups/EXAMPLEGROUP01