fa2d6685f3
When a node is inspected more than one time and the database is configured as a storage backend, a new entry is made in the database for each inspection result (node inventory). This patch handles this behaviour as follows: By deleting previous inventory entries for the same node before adding a new entry in the database. By retrieving the most recent node inventory from the database when the database is queried. Change-Id: Ic3df86f395601742d2fea2bcde62f7547067d8e4
16 lines
642 B
YAML
16 lines
642 B
YAML
---
|
|
fixes:
|
|
- |
|
|
Fixes a bug that occurs when a node is inspected more than once and the
|
|
database is configured as a storage backend: a new node inventory entry
|
|
is added in the database for each inspection result, causing more than one
|
|
inventory to exist for the node in the node_inventory table.
|
|
|
|
This is handled by:
|
|
|
|
* Deleting any previous inventory entries for a node before adding a new
|
|
entry in the database.
|
|
* Retrieving the most recent node inventory from the database when the
|
|
database is queried. (To cater for databases that already contain
|
|
duplicate node inventories due to the bug.)
|