mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-09-14 18:56:52 +00:00
Record GPU/TPU host changes in the change journal
Seven gpu_tpu scripts now write through the journal for host changes only — driver and package installs, vfio binding, modprobe.d, /etc/modules, GRUB and udev — while VM and LXC configuration stays out; add_gpu_vm and install_coral_lxc journal only their host writes. amd_gpu_tools records its install, and pmx_journal.sh gains pmx_record_uninstall while changes_journal.py retires an installed package when ProxMenux removes it. What each function writes is byte-identical to before, verified by tests/journal/verify_journal_migration.py.
This commit is contained in:
@@ -255,6 +255,13 @@ def ingest(limit: int = 5000) -> int:
|
||||
try:
|
||||
conn.execute("BEGIN IMMEDIATE")
|
||||
for r in rows:
|
||||
if r[3] == "uninstall_package":
|
||||
# A removal retires the package's install entry; the current
|
||||
# state is that it is no longer on the host.
|
||||
conn.execute(
|
||||
"DELETE FROM changes WHERE class = ? AND target = ?",
|
||||
(CLASS_INSTALLATION, r[7]))
|
||||
continue
|
||||
if r[2] == CLASS_INSTALLATION:
|
||||
# A package is one entry however often, or by whichever helper,
|
||||
# it is installed.
|
||||
|
||||
Reference in New Issue
Block a user