- SqliteInventoryRepository::save() now compares the incoming
serde_json bytes against the latest stored `data` blob for this
host_id. If byte-identical, the insert is skipped with an info log
"Host '<id>' unchanged, skipping save". Genuine changes still
produce a new version row, preserving the audit trail. Eliminates
the unbounded row growth from repeated discovery (mDNS is
continuous, CIDR scans often re-run). Addresses the long-standing
FIXME in modules/inventory; the comment is now removed.
- Reworded the caller-side log that fires after repo.save() from
"Saved [new] host id X, summary: ..." to "Discovered host X,
summary: ...". The old text claimed "Saved" even when the repo had
actually skipped the insert, producing contradictory log lines on
re-runs.
- Harmonized every host-specific inquire prompt in the discovery
flow behind a new print_host_header() helper: each prompt is now
preceded by a blank line and a "Host: <summary>" banner, and the
redundant host name inside the question text is stripped (disk
prompt, bond confirm). The node-selection prompt is unchanged --
it picks *which* host, so there is no current host yet.
21 lines
443 B
JSON
21 lines
443 B
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "SELECT data as \"data!: Vec<u8>\" FROM physical_hosts WHERE id = ? ORDER BY version_id DESC LIMIT 1",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "data!: Vec<u8>",
|
|
"ordinal": 0,
|
|
"type_info": "Null"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 1
|
|
},
|
|
"nullable": [
|
|
false
|
|
]
|
|
},
|
|
"hash": "c7ca191faaa23b3ec5019f8c4910f666db9c6c2be22ffe563be4b7caef645bd1"
|
|
}
|