pkgs.incus (Version 6.1) -- Stopped virtual machines show 'ERROR'
Describe the bug
This bugs happens only with incus 6.1 (it is fine with incus LTS) When a Virtual Machine is stopped, the virtual machine's status shows as "ERROR" and not as "STOPPED" This means it's not possible to edit the machine with the web UI, and may have other consequences. This was tested using LVM storage, but it may affect on any storage method.
Steps To Reproduce
Steps to reproduce the behavior:
- Enable incus
- Set virtualisation.incus.package to pkgs.incus
- Create a VM
- Stop the VM
- Check "incus ls" and notice the status is ERROR
Expected behavior
When using incus ls, the status should be STOPPED.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
This problem happens only with pkgs.incus and LTS is fine. This issue does not occur in debian with Incus 6.1, so I can only assume it is nix specific.
Notify maintainers
@adamcstephens @mkg20001
Add a :+1: reaction to issues you find important.
What does incus info —-show-log <instance name> show?
What does
incus info —-show-log <instance name>show?
On 6.1:
incus info --show-log kasm
Error: stat /proc/0: no such file or directory
On 6.0 LTS:
incus info --show-log kasm
Name: kasm
Status: STOPPED
Type: virtual-machine
Architecture: x86_64
Created: 2024/05/14 10:35 JST
Last Used: 2024/05/14 10:37 JST
Log:
I'm able to reproduce the same error. I suspect this may be an upstream bug, and initial debugging gave me no info. I do note that the host system does not have pid 0, which maybe is the cause.
OK, I can open an issue upstream.
So, you were right. It's an upstream bug, and was already fixed in main.
Thanks for checking upstream. Is this problematic enough that it needs to be patched or can it it wait for 6.2?
Thanks for checking upstream. Is this problematic enough that it needs to be patched or can it it wait for 6.2?
Of course it's just my opinion, but I think it is problematic enough that it's best not to distribute 6.1 in its current state. It's not just an issue of displaying "ERROR" instead of "STOPPED", as it breaks any settings in the UI to be done on a stopped machine, so for example, you can't change the allocated RAM on a VM from the UI anymore. I think either distributing 6.0 as pkgs.incus until 6.2 comes out or patching it would be the right thing to do. I think it will not be so long until 6.2 is released.
On the other hand, since the default is LTS and pkgs.incus is not the only choice, it may be not as big of a deal as it would be otherwise.
Thanks, I understand. I'll review a PR if someone really wants to patch this, but I'm not sure it's worth the processing time. We're only one release from LTS so it isn't much of a downgrade yet, and only a couple weeks from upstream fixing this in a release.
Incus 6.2 is now available as of 10 hours ago, so this should be taken care of easily now.
With that said, one thing I can think of which could be problematic is if 6.1 is the version frozen into NixOS 24.05 as "pkgs.incus" as it is now. I think it would be much better to have it be a version without a big bug.
I think we'll be backporting releases to the non-LTS, with the understanding that it's a rolling release so breakage can happen.
6.2 is merged.