fix: more messages say only what is certain

- Host restore notification: reports its tasks and no longer calls the node fully ready.
- Watchdog notification: covers an application that did not start as well as one that stopped again.
- OCI: Modify summary, Immich recognition preview, private network kept by another guest, empty USB list.
- gzip diagnostic no longer says that nothing changed.

Source questions from the Italian review by @f3rs3n.
This commit is contained in:
MacRimi
2026-10-07 07:35:10 +02:00
parent fc14ff5c33
commit f0d7d4f8f7
24 changed files with 105 additions and 77 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ def remove(root, vmid):
msg_warn(f"{translate('Could not complete private network release:')} {bridge}")
incomplete = True
elif bridge:
msg_info(f"{translate('The private network is still used by another container and is kept:')} {bridge}")
msg_info(f"{translate('The private network is still used by another guest and is kept:')} {bridge}")
if not remove_owned_host_firewall(primary):
incomplete = True
release_shared_host_files(hookscripts)
+1 -1
View File
@@ -199,7 +199,7 @@ def look(states, now):
if started and notice_due(state, now):
oci_operation_notice.notify('oci_watchdog_restarted', data)
elif action == 'give-up':
print(f'CT {vmid} ({name}) keeps stopping; it is left stopped', flush=True)
print(f'CT {vmid} ({name}) could not be kept running; it is left stopped', flush=True)
oci_operation_notice.notify('oci_watchdog_failed', data)
+1 -1
View File
@@ -19,7 +19,7 @@ def choose_usb_device(ui, title, default=None, attached=()):
for row in host.usb_devices() if row['path'] not in attached]
manual_prompt = translate('Host USB node (e.g. /dev/ttyACM0 or /dev/bus/usb/003/004)')
if not options:
ui.message(translate('No USB device was found on this host.'))
ui.message(translate('No selectable USB device was found. Type the host node by hand.'))
return ui.ask(manual_prompt, default or '/dev/ttyACM0')
options.append(('manual', translate('Another node, typed by hand')))
selected = ui.choose(title, options, default if default in dict(options) else options[0][0])
+1 -1
View File
@@ -472,7 +472,7 @@ def _removal_summary(project, vmid):
if bridge and not oci_remove.bridge_in_use(bridge, set(members)):
text += ['', f"{translate('Private network targeted for release if no other guest uses it:')} {bridge}"]
elif bridge:
text += ['', f"{translate('Private network kept, because other containers still use it:')} {bridge}"]
text += ['', f"{translate('Private network kept, because other guests still use it:')} {bridge}"]
if (primary.get('deployment') or {}).get('host_firewall'):
text += ['', translate('A matching managed host firewall rule may also be removed.')]
if kept:
+7 -4
View File
@@ -140,8 +140,10 @@ def summary(member, changes):
lines += [f"- {path}" for path in changes['remove_mounts']]
lines += [f"+ {device['host_path']}" for device in changes['add_devices']]
lines += [f"- {path}" for path in changes['remove_devices']]
lines += ['', translate('The container is restarted to apply the changes. Its own data, the database '
'and the other containers of the application are not touched.')]
lines += ['', translate('A running container is restarted to apply the changes; a stopped one is left stopped. '
'The data of the application, its database and the configuration of the other '
'containers are not changed. A container volume removed here is deleted with the '
'data in it.')]
return '\n'.join(lines)
@@ -194,8 +196,9 @@ def change_recognition(project, ui, primary, member, run_lifecycle):
text = (f"{translate('Recognition')}: {labels.get(current, current)} → {labels[selected]}\n\n"
+ translate('The machine learning container is rebuilt with the image of the new choice. Its model '
'cache, the library and the database are kept. The whole application is stopped and '
'updated, as in an update; if anything fails, the previous containers and the previous '
'choice are restored.'))
'updated, as in an update. If the operation fails after a container was changed, the '
'previous containers and the previous choice are restored. An operation that stops '
'halfway is recovered from the OCI management menu.'))
if not ui.review(text, translate('Modify OCI stack'), question=translate('Change the recognition now?'), default=True):
return False
command = [sys.executable, str(project / 'remote/oci_immich_recognition.py'), str(primary['vmid']),
+1 -1
View File
@@ -68,7 +68,7 @@ class StackRecreationTests(unittest.TestCase):
{"host_path": "/dev/ttyACM0"}], "add_mounts": [
{"type": "host-bind", "container_path": "/scans", "source": "/mnt/scans"}]}
text = stack_recreation.summary(MEMBER, changes)
for expected in ("CT 129", "+ /scans", "- /media-extra", "+ /dev/ttyACM0", "are not touched"):
for expected in ("CT 129", "+ /scans", "- /media-extra", "+ /dev/ttyACM0", "are not changed"):
self.assertIn(expected, text)