Vcenter discovery does not use the Identification and Reconciliation engine to uniquely identify a CI but a function within script include VCenterESXHostsSensor is used instead.
Line 36: index: [ esxCorrelationIdIndex, ['serial_number'] ]
If the ESX servers discovered in the payload do not already exist in CMDB, 'esxCorrelationIdIndex' will not return results, which means that serial_number will then be used to uniquely identify a CI. Now, if the discovered ESX servers have duplicate serial_number in the payload, then only one ESX server CI record will be created and attributes such as name, correlation_id etc. will be overwritten with the name, correlation_id of the next ESX server with the same serial number.
This also means that Identification Engine Reconciliation rules, such as Data Source Precedence is not used by these inserts/updates.
Steps to Reproduce
- Run Vcenter discovery in an environment where ESX servers have duplicate serial numbers.
This problem has been fixed. If you are able to upgrade, review the Fixed In or Intended Fix Version fields to determine whether any versions have a planned or permanent fix.
Modify the CI identifier in script include VCenterESXHostsSensor. For example, use correlation_id first if it can be trusted to uniquely identify a CI in your environment.
- Edit line 36 of "VCenterESXHostsSensor" script include
- Replace index: [ esxCorrelationIdIndex, ['serial_number'] ]
- with index: [ esxCorrelationIdIndex, ['correlation_id'], ['name'] ],
- OR, with a combination like index: [ ['morid', 'correlation_id'], ['name'] ]
- Click on Update
Related Problem: PRB1323765