Symptoms:
ERROR [vcf_dm,757881f5d620466e,e653] [c.v.e.s.o.model.error.ErrorFactory,dm-exec-15] [1Q9B66] FAILED_TO_FETCH_NSXT_DATA_FROM_INVENTORY Unable to get NSX related data from inventory
com.vmware.evo.sddc.orchestrator.exceptions.OrchTaskException: Unable to get NSX related data from inventory
..
Caused by: java.lang.IllegalArgumentException: Expected 1 but did not find any MORs of a type DistributedVirtualPortgroup and name VCF-edge_stale_nsx_portgroup-External-1
VMware Cloud foundation 5.x
To resolve the issue remove the stale PortGroup from the VCF inventory using the steps below:
IMPORTANT NOTE: Make sure that backup/snapshots of the SDDC manager have been taken prior to any modification.
curl -s localhost/inventory/vds | jq
curl -s localhost/inventory/vds?id=<ID> | jq ".[0]" > vds_info.json
Example: curl -s localhost/inventory/vds?id=7c764c6-7dd9-4b7c-b88e-3feab8f190f6 | jq ".[0]" > vds_info.json
This should create a json with the VDS that we want to update under a file called vds_info.json
.
vds_info.json
with a vi editor and remove the json entries with the name of the stale portgroup. The information that we want to delete should be like the excerpt below. Please make sure there are no extra commas or brackets left over when removing these entries.
{
"name": "VCF-edge_stale_nsx_portgroup-External-1",
"transportType": "EXTERNAL",
"type": "EPHEMERAL",
"vlanId": 0,
"activeUplinks": [
"uplink1"
],
"standbyUplinks": [
"uplink2"
]
},
Once done save the file.
cat vds_info.json | jq
If there is no error, it should print the json outUpdate the vds table in the Inventory using the updated vds_info.json file using the following command:curl localhost/inventory/vds/<id> -X PUT -d @vds_info.json -H 'Content-Type: application/json'
Example:curl localhost/inventory/vds/7c764c6-7dd9-4b7c-b88e-3feab8f190f6 -X PUT -d @vds_info.json -H 'Content-Type: application/json'