From 4205c0c0e3e109da448d9cb11d523fbf9ad6914a Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Sun, 2 Aug 2026 02:21:04 -0400 Subject: [PATCH] [FIX] qemu ssh: correct the virt-manager restart advice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The message claimed virt-manager rewrites its settings on exit and had to be restarted. Reading the 5.1.0 source shows the opposite for the part that matters: connection.py registers listen_perconn on /pretty-name and its callback emits state-changed, so a running virt-manager picks a renamed connection up immediately. Only the connection LIST is read at startup, so a restart is needed to see a newly added one — which is what the message now says. Co-Authored-By: Claude Opus 4.8 (1M context) --- script/todo/todo.py | 8 +++++--- script/todo/todo_i18n.py | 10 +++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/script/todo/todo.py b/script/todo/todo.py index afbf324..2ec3215 100755 --- a/script/todo/todo.py +++ b/script/todo/todo.py @@ -1573,9 +1573,11 @@ class TODO: self._virt_manager_set_label(uri, label) added = self._virt_manager_add(uris) if added: - # virt-manager réécrit ses réglages en quittant : s'il tourne, il - # écraserait ce qu'on vient d'ajouter. - print(f" ⚠ {t('Restart virt-manager if it is open.')}") + # Le NOM est relu à chaud (virt-manager écoute /pretty-name), + # mais la liste des connexions est lue au démarrage : une + # nouvelle entrée n'apparaît qu'au prochain lancement. + note = t("Restart virt-manager to see the new connections") + print(f" ℹ️ {note} ({t('the names apply live')})") def _qemu_ssh_probe_remote(self, alias): """Sonde `alias` : (libvirt_présent, [(nom, ip)]), ou None si diff --git a/script/todo/todo_i18n.py b/script/todo/todo_i18n.py index effa2e4..11936aa 100644 --- a/script/todo/todo_i18n.py +++ b/script/todo/todo_i18n.py @@ -1504,9 +1504,13 @@ TRANSLATIONS = { "en": "Add the missing connections to virt-manager? " "(Y/n, default: yes): ", }, - "Restart virt-manager if it is open.": { - "fr": "Redémarrer virt-manager s'il est ouvert.", - "en": "Restart virt-manager if it is open.", + "Restart virt-manager to see the new connections": { + "fr": "Redémarrer virt-manager pour voir les nouvelles connexions", + "en": "Restart virt-manager to see the new connections", + }, + "the names apply live": { + "fr": "les noms s'appliquent à chaud", + "en": "the names apply live", }, "SSH hosts written": { "fr": "Hôtes SSH écrits",