PenningLabs / lxconsole

LXD Graphical Web Console
GNU Affero General Public License v3.0
123 stars 15 forks source link

Can't get a list of instances (vms) if one or more are reporting an error. #22

Closed pazos closed 3 months ago

pazos commented 3 months ago

Steps to reproduce.

  1. ArchLinux host w/ incus 6.1 (affected by https://discuss.linuxcontainers.org/t/stopped-instances-report-state-error/20004)
  2. Stop a VM.
  3. Try to get a list of virtual machines under "Instances"

Expected results: a list of running and error instances (like in incus list)

Result: Captura desde 2024-05-22 22-34-14

pazos@terra ~> incus list
+-----------+---------+------------------------+------+-----------------+-----------+
|   NAME    |  STATE  |          IPV4          | IPV6 |      TYPE       | SNAPSHOTS |
+-----------+---------+------------------------+------+-----------------+-----------+
| debian    | ERROR   |                        |      | VIRTUAL-MACHINE | 0         |
+-----------+---------+------------------------+------+-----------------+-----------+
matthewalanpenning commented 3 months ago

@pazos Interesting. Is the ERROR state something that happens to all VMs in Arch with Incus 6.1? I am trying to figure out how to recreate the ERROR state to see what is going.

pazos commented 3 months ago

@pazos Interesting. Is the ERROR state something that happens to all VMs in Arch with Incus 6.1? I am trying to figure out how to recreate the ERROR state to see what is going.

Yup, they work perfectly fine when they're running but show ERROR when they're stopped.

It should be easy to reproduce or Arch:

incus init --vm --empty whatever
incus list whatever
+----------+-------+------+------+-----------------+-----------+
|   NAME   | STATE | IPV4 | IPV6 |      TYPE       | SNAPSHOTS |
+----------+-------+------+------+-----------------+-----------+
| whatever | ERROR |      |      | VIRTUAL-MACHINE | 0         |
+----------+-------+------+------+-----------------+-----------+
matthewalanpenning commented 3 months ago

Thanks. I was able to recreate in Arch. I found the issue in my code and will have a patch out hopefully this weekend in v0.5.3.

matthewalanpenning commented 3 months ago

Just pushed the v0.5.3 update. I also added the ability to start your instance from the Error state too to get it back running.

pazos commented 3 months ago

Thank you!

Works perfectly.