1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-12-03 17:36:05 +00:00

feat(instances): a VM a fault stopped or paused says why

libvirt gives each state its reason; the panel showed only the state, so a
VM QEMU paused because its storage filled up read "Suspended" like one an
administrator paused.

- instances.states.REASONS: the fault reasons told (disk error, watchdog,
  guest crash or kernel panic, a crash of the guest or its QEMU process,
  libvirt stopping it after a restart, failed post-copy migration, libvirt
  error, failed start); the ordinary ones (user, migration, snapshot) are not
- the lists read the reason with the state in their one getAllDomainStats
  call (get_domain_rows, get_domain_states: a change of reason reloads a
  list) and show it under the state badge
- the VM page reads state and reason in one virDomainGetState (a reason
  means something only with its own state) and tells it in an alert; a VM
  paused by a disk error names each disk and what it met
  (virDomainGetDiskErrors), and when a storage has no free space, what to
  do: an administrator frees space and resumes it. Disk errors are read
  only then: libvirt keeps the last one after a resume. The page's poll
  reloads on a change of reason too

Checked live on a Vagrant host: a guest filling a disk on a 40 MiB pool was
paused (I/O error, vda: no space); the page said so, and after the pool grew
and the VM was resumed the alert was gone.
This commit is contained in:
catborise 2026-11-22 21:03:22 +03:00
parent 7408a575d6
commit bdc5569cc8
17 changed files with 330 additions and 18 deletions

Binary file not shown.

View file

@ -13039,3 +13039,58 @@ msgstr "İş işleyicisi çalışmıyor; en son %(when)s görüldü. İşler o y
#: operations/templatetags/operations.py:99
msgid "The job worker has not run yet. Jobs wait until it runs."
msgstr "İş işleyicisi henüz hiç çalışmadı. İşler o çalışana kadar bekler."
#: instances/states.py:27
msgid "Paused by a disk error"
msgstr "Bir disk hatası nedeniyle duraklatıldı"
#: instances/states.py:28
msgid "Paused by its watchdog"
msgstr "Watchdog aygıtı tarafından duraklatıldı"
#: instances/states.py:29
msgid "Paused: the guest crashed"
msgstr "Duraklatıldı: konuk çöktü"
#: instances/states.py:30
msgid "Paused: its migration failed midway"
msgstr "Duraklatıldı: taşıma yarıda başarısız oldu"
#: instances/states.py:31
msgid "Paused by a libvirt error"
msgstr "Bir libvirt hatası nedeniyle duraklatıldı"
#: instances/states.py:33
msgid "Stopped: it crashed"
msgstr "Durdu: çöktü"
#: instances/states.py:35
msgid "Stopped by libvirt"
msgstr "libvirt tarafından durduruldu"
#: instances/states.py:36
msgid "Stopped: it failed to start"
msgstr "Durdu: başlatılamadı"
#: instances/states.py:37
msgid "The guest's kernel panicked"
msgstr "Konuğun çekirdeği panik verdi"
#: instances/states.py:42
#, python-format
msgid "%(dev)s: its storage has no free space"
msgstr "%(dev)s: depolamasında boş alan yok"
#: instances/states.py:43
#, python-format
msgid "%(dev)s: an I/O error"
msgstr "%(dev)s: G/Ç hatası"
#: instances/templates/instance.html:55
msgid "Free space on its storage, then resume it."
msgstr "Depolamasında yer açın, ardından sanal makineyi devam ettirin."
#: instances/templates/instance.html:55
msgid "An administrator has to free space on its storage and resume it."
msgstr "Bir yöneticinin depolamasında yer açıp sanal makineyi devam ettirmesi gerekir."

Binary file not shown.

View file

@ -12314,3 +12314,58 @@ msgstr "工作进程未在运行;最后在线时间 %(when)s。任务将等待
#: operations/templatetags/operations.py:99
msgid "The job worker has not run yet. Jobs wait until it runs."
msgstr "工作进程尚未运行过。任务将等待它运行。"
#: instances/states.py:27
msgid "Paused by a disk error"
msgstr "因磁盘错误而暂停"
#: instances/states.py:28
msgid "Paused by its watchdog"
msgstr "已被其看门狗设备暂停"
#: instances/states.py:29
msgid "Paused: the guest crashed"
msgstr "已暂停:客户机崩溃"
#: instances/states.py:30
msgid "Paused: its migration failed midway"
msgstr "已暂停:迁移中途失败"
#: instances/states.py:31
msgid "Paused by a libvirt error"
msgstr "因 libvirt 错误而暂停"
#: instances/states.py:33
msgid "Stopped: it crashed"
msgstr "已停止:已崩溃"
#: instances/states.py:35
msgid "Stopped by libvirt"
msgstr "已被 libvirt 停止"
#: instances/states.py:36
msgid "Stopped: it failed to start"
msgstr "已停止:启动失败"
#: instances/states.py:37
msgid "The guest's kernel panicked"
msgstr "客户机内核发生 panic"
#: instances/states.py:42
#, python-format
msgid "%(dev)s: its storage has no free space"
msgstr "%(dev)s:其存储没有可用空间"
#: instances/states.py:43
#, python-format
msgid "%(dev)s: an I/O error"
msgstr "%(dev)s:I/O 错误"
#: instances/templates/instance.html:55
msgid "Free space on its storage, then resume it."
msgstr "请在其存储上释放空间,然后恢复它。"
#: instances/templates/instance.html:55
msgid "An administrator has to free space on its storage and resume it."
msgstr "需要管理员在其存储上释放空间并恢复它。"