erplibre/script/todo
Mathieu Benoit bd94c277d3 [FIX] script qemu/todo: bonne IP quand la VM a plusieurs baux DHCP
Symptôme : ~/.ssh/config (et l'install) pointaient sur .31 alors que la VM
était joignable sur .32 -> SSH KO (« No route to host »), console OK.

Cause : au boot, une image cloud demande d'abord une IP DHCP avec son
hostname par défaut (« ubuntu ») -> 1er bail ; puis cloud-init fixe le vrai
hostname et le client redemande -> 2e bail (IP différente). La MÊME MAC a
donc DEUX baux ; le 1er (« ubuntu ») devient périmé. Le code retenait
aveuglément le PREMIER IPv4 de « virsh domifaddr » = le bail périmé. Plus
visible sur s390x/arm64 émulé (boot lent -> les deux baux coexistent).

Fix :
- todo._qemu_vm_ip : renvoie en priorité l'IP dont le bail dnsmasq porte le
  hostname == nom de la VM (bail définitif), sinon une IP JOIGNABLE (sshd up,
  test TCP:22), sinon le dernier bail — jamais le 1er au hasard. Attente
  portée à 10 min (boot émulé lent). Helpers _qemu_lease_candidates /
  _qemu_ip_reachable / _qemu_lease_ip_for_host.
- deploy_qemu.wait_for_ip : même logique (IP joignable, sinon la plus
  récente) pour l'IP affichée en fin de déploiement standalone.

Validé sur la VM s390x réelle : candidats [.31, .32] -> choisit .32
(hostname-match + seule joignable) ; ssh via alias OK.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-28 08:33:50 +00:00
..
database_manager.py [IMP] todo: add erase-database menu command 2026-06-25 02:37:22 -04:00
kdbx_manager.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
logo_ascii.txt [IMP] bot assistant TODO 2025-04-27 02:40:20 -04:00
qemu_install_monitor.py [IMP] script todo: suffixe d'arch dans le nom + log d'install non vide 2026-07-28 08:15:46 +00:00
README.base.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.fr.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
source_todo.sh [UPD] TODO: auto installation 2025-10-31 01:33:34 -04:00
todo.json [IMP] script todo: add QEMU/KVM VM deploy menu 2026-07-15 11:48:12 +00:00
todo.py [FIX] script qemu/todo: bonne IP quand la VM a plusieurs baux DHCP 2026-07-28 08:33:50 +00:00
todo_example.json [UPD] TODO: simplify code by reusing method and support same command 2025-04-28 00:35:27 -04:00
todo_file_browser.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
todo_i18n.py [IMP] script todo: suffixe d'arch dans le nom + log d'install non vide 2026-07-28 08:15:46 +00:00
todo_upgrade.py [FIX] script todo upgrade: don't create branch if already exist 2026-06-29 03:22:58 -04:00
version_manager.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00

TODO is an assistant robot to use ERPLibre Execute it with ./script/todo/todo.py or make todo.

For a new project, copy todo_example.json to private/todo/todo_override.json | private/todo/todo_override_private.json and edit it.