[FIX] qemu ssh: correct the virt-manager restart advice

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) <noreply@anthropic.com>
This commit is contained in:
Mathieu Benoit 2026-08-02 02:21:04 -04:00
parent cd8c32b5b2
commit 4205c0c0e3
2 changed files with 12 additions and 6 deletions

View file

@ -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

View file

@ -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",