Symptoms:
Following logs in Policy.log
INFO http-nio-127.0.0.1-6440-exec-113 UI_LOG 6512 - [nsx@6876 comp="nsx-manager" level="INFO" reqId="15428629-####-####-####-########e66" subcomp="policy" username="<user>"] {"user":"","message":"Api Errors->","messageData":{"headers":{"normalizedNames":{},"lazyUpdate":null},"status":400,"statusText":"OK","url":"https://<nsx-manager-fqdn>/policy/api/v1/search/aggregate?page_size=50&cursor=0&sort_by=display_name&sort_ascending=true","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https://<nsx-manager-fqdn>/policy/api/v1/search/aggregate?page_size=50&cursor=0&sort_by=display_name&sort_ascending=true: 400 OK","error":{"details":"com.vmware.nsx.management.search.common.exceptions.SearchException: Invalid Query","httpStatus":"BAD_REQUEST","error_code":60576,"module_name":"nsx-search","error_message":"Exception while searching during pipeline execution"}},"level":"Error","browser":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36","time":"Sat Jul 31 2021 01:09:50 GMT+0100 (British Summer Time)","location":"/app/networks/segments/module/home"}
INFO http-nio-127.0.0.1-6440-exec-113 UI_LOG 6512 - [nsx@6876 comp="nsx-manager" level="INFO" reqId="15428629-####-####-####-########e66" subcomp="policy" username="<user>"] {"user":"","message":"Api Errors->","messageData":{"headers":{"normalizedNames":{},"lazyUpdate":null},"status":400,"statusText":"OK","url":"https://<nsx-manager-fqdn>/policy/api/v1/search/aggregate?page_size=50&cursor=0&sort_by=display_name&sort_ascending=true","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https://<nsx-manager-fqdn>/policy/api/v1/search/aggregate?page_size=50&cursor=0&sort_by=display_name&sort_ascending=true: 400 OK","error":{"details":"com.vmware.nsx.management.search.common.exceptions.SearchException: Invalid Query","httpStatus":"BAD_REQUEST","error_code":60576,"module_name":"nsx-search","error_message":"Exception while searching during pipeline execution"}},"level":"Error","browser":"Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36","time":"Sat Jul 31 2021 01:10:09 GMT+0100 (British Summer Time)","location":"/app/networks/segments/module/home"}
Following from syslog:
2021-07-31T00:23:00.160Z <nsx-manager-fqdn> NSX 6512 SYSTEM [nsx@6876 audit="true" comp="nsx-manager" level="INFO" subcomp="policy"] UserName:'<username>' ModuleName:'nsx-search' Operation:'POST@/api/v1/search/aggregate' Operation status: 'failure' Error: Exception while searching during pipeline execution
2021-07-31T00:23:00.160Z <nsx-manager-fqdn> NSX 6512 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="1d400471-####-####-####-########5e2" splitId="rY4cB24C" splitIndex="1 of 4" subcomp="policy" update="true" username="<user>"] UserName="<user>", ModuleName="Search", Operation="GetAggregateData", Operation status="failure", New value=[{"primary":{"resource_type":"Segment"},"related":[{"join_condition":"path:connectivity_path","alias":"connectivity","resource_type":"Tier0 OR Tier1"},{"join_condition":"parent_path:path","alias":"SegmentDiscoveryProfileBindingMap","resource_type":"SegmentDiscoveryProfileBindingMap"},{"join_condition":"parent_path:path","alias":"SegmentSecurityProfileBindingMap","resource_type":"SegmentSecurityProfileBindingMap"},{"join_condition":"parent_path:path","alias":"SegmentQoSProfileBindingMap","resource_type":"SegmentQoSProfileBindingMap"},{"join_condition":"path:$1.ip_discovery_profile_path","alias":"IPDiscoveryProfile","resource_type":"IPDiscoveryProfile"},{"join_condition":"path:$1.mac_discovery_profile_path","alias":"MacDiscoveryProfile","resource_type":"MacDiscoveryProfile"},{"join_condition":"path:$2.spoofguard_profile_path","alias":"SpoofGuardProfile","resource_type":
<nsx-manager-fqdn> NSX 6512 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="1d400471-####-####-####-########5e2" splitId="rY4cB24C" splitIndex="2 of 4" subcomp="policy" update="true" username="<user>"] "SpoofGuardProfile"},{"join_condition":"path:$2.segment_security_profile_path","alias":"SegmentSecurityProfile","resource_type":"SegmentSecurityProfile"},{"join_condition":"path:$3.qos_profile_path","alias":"QoSProfile","resource_type":"QoSProfile"},{"join_condition":"parent_path:path","size":0,"alias":"static_binding_ipv4","resource_type":"DhcpV4StaticBindingConfig"},{"join_condition":"path:dhcp_config_path","alias":"DhcpServerConfig","resource_type":"DhcpServerConfig OR DhcpRelayConfig"},{"join_condition":"path:l2_extension.l2vpn_paths","alias":"l2vpn_session","resource_type":"L2VPNSession"},{"join_condition":"parent_path:path","size":0,"alias":"segment_ports","resource_type":"SegmentPort"},{"join_condition":"parent_path:path","size":0,"alias":"static_binding_ipv6","resource_type":"DhcpV6StaticBindingConfig"},{"join_condition":"path:transport_zone_path","alias":"transport_zone","resource_type":"PolicyTransportZone"},{"join_condition":"path:$14.parent_path","size":0,"alias":
2021-07-31T00:23:00.160Z <nsx-manager-fqdn> NSX 6512 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="1d400471-####-####-####-########5e2" splitId="rY4cB24C" splitIndex="3 of 4" subcomp="policy" update="true" username="<user>"] "EnforcementPoint","resource_type":"EnforcementPoint"},{"join_condition":"path:$15.parent_path","alias":"Site","resource_type":"Site"},{"join_condition":"path:advanced_config.address_pool_paths","alias":"ip_address_pool","resource_type":"IpAddressPool"},{"join_condition":"path:metadata_proxy_paths","alias":"MetadataProxyConfig","resource_type":"MetadataProxyConfig"},{"join_condition":"path:path","alias":"SPAN","resource_type":"SPAN"},{"join_condition":"path:evpn_tenant_config_path","alias":"evpn_tenant","resource_type":"EvpnTenantConfig"},{"join_condition":"parent_path:$0.path","size":0,"alias":"gatewayLocaleServices","resource_type":"LocaleServices"},{"join_condition":"path:$21.edge_cluster_path","size":0,"alias":"gatewayLocaleEdgeCluster","resource_type":"PolicyEdgeCluster"},{"join_condition":"path:$22.parent_path","size":0,"alias":"gatewayLocaleEp","resource_type":"EnforcementPoint"},{"join_condition":"path:$23.parent_path","alias":"gatewaySite","resource_type":
2021-07-31T00:23:00.160Z <nsx-manager-fqdn> NSX 6512 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="1d400471-####-####-####-########5e2" splitId="rY4cB24C" splitIndex="4 of 4" subcomp="policy" update="true" username="<user>"] "Site"},{"join_condition":"alarm_source:path","included_fields":"alarm_source,severity,status","alias":"alarms_Segment","resource_type":"Alarm"}]}]
<nsx-manager-fqdn> NSX 6512 SYSTEM [nsx@6876 audit="true" comp="nsx-manager" level="INFO" subcomp="policy"] UserName:'<user>' ModuleName:'nsx-search' Operation:'POST@/api/v1/search/aggregate' Operation status: 'failure' Error: Exception while searching during pipeline execution
<nsx-manager-fqdn> CRON 20798 - - (root) CMD ( cd / && run-parts --report /etc/cron.minutes)
<nsx-manager-fqdn> CRON 20799 - - (root) CMD ( /usr/bin/nice -n 10 /opt/vmware/bin/disk_usage_monitor.py >/dev/null 2>&1)
<nsx-manager-fqdn> CRON 20800 - - (root) CMD (/usr/bin/flock -n /tmp/.ping.stats.lock /opt/vmware/bin/ping_stats)
<nsx-manager-fqdn> NSX 6512 - [nsx@6876 audit="true" comp="nsx-manager" level="INFO" reqId="4962025e-####-####-####-########f5c" splitId="UBFGceSr" splitIndex="1 of 4" subcomp="policy" update="true" username="<user>"] UserName="<user>", ModuleName="Search", Operation="GetAggregateData", Operation status="failure", New value=[{"primary":{"resource_type":"Segment"},"related":[{"join_condition":"path:connectivity_path","alias":"connectivity","resource_type":"Tier0 OR Tier1"},{"join_condition":"parent_path:path","alias":"SegmentDiscoveryProfileBindingMap","resource_type":"SegmentDiscoveryProfileBindingMap"},{"join_condition":"parent_path:path","alias":"SegmentSecurityProfileBindingMap","resource_type":"SegmentSecurityProfileBindingMap"},{"join_condition":"parent_path:path","alias":"SegmentQoSProfileBindingMap","resource_type":"SegmentQoSProfileBindingMap"},{"join_condition":"path:$1.ip_discovery_profile_path","alias":"IPDiscoveryProfile","resource_type":"IPDiscoveryProfile"},{"join_condition":"path:$1.mac_discovery_profile_path","alias":"MacDiscoveryProfile","resource_type":"MacDiscoveryProfile"},{"join_condition":"path:$2.spoofguard_profile_path","alias":"SpoofGuardProfile","resource_type":
The grid keeps loading (i.e. spinner) when there is an entity created with double quote in the path field. There is no input for path field from the UI, display name get appended in the path.
Double quotes in the ‘path’ field result into pipeline exception while fetching related objects. Hence the issue.
The following special characters are not allowed in the API when provided in the display name:
; , | = ~ @
As part of solution, escape the double quote while forming the query pipeline during the execution:
If you enter the double quote in the display name, add unique id while forming the path. Also escape the double quote while fetching the single segment after the update.
Workaround:
GET : /api/v1/logical-switches/<lswitch-id>
example: GET /api/v1/logical-switches/37603826-cecc-4e6a-ae25-5ad693b591ca
response contain :
"tags": [
{
"scope": "policyPath",
"tag": "/infra/segments/1test*\"-tUHI3kvVG"
}
],
DELETE : /policy/api/v1/infra/segments/1test*"-tUHI3kvVG