Fix(inventory): 'uuid' criterion must be identical to what VirtualMachine does #18929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist before requesting a review
Please delete options that are not relevant.
Description
This PR enhances the GLPI reconciliation engine by integrating the
getUUIDRestrictCriteria()
method into UUID-based matching rules.Currently, virtual machine processing correctly identifies and associates computers using this method. However, the reconciliation rules do not account for "mixed" UUIDs in their queries, leading to inconsistencies.
As a result, while the native inventory successfully links computers even when UUIDs are "mixed," the reconciliation process fails to do so.
Use Case:
1️⃣ Step 1: Importing an inventory file (Computer with Agent)
"uuid": "BC4C4D56-A9C6-6919-3FEE-FA0F3887B6A5"
.Computer
→ ✅ OK2️⃣ Step 2: ESX Inventory & VM Reconciliation
"uuid": "564d4cbc-c6a9-1969-3fee-fa0f3887b6a5"
.Computer
's UUID is updated to match the ESX one → ✅ OK3️⃣ Step 3: Importing an inventory file (Computer without Agent / Agentless)
"uuid": "BC4C4D56-A9C6-6919-3FEE-FA0F3887B6A5"
.Computer
, GLPI creates a new one.getUUIDRestrictCriteria()
→ ❌ KOThis leads to an error in ESX (the virtual machine manager) because ESX cannot correctly identify the associated computer.
Screenshots (if appropriate):