Thanks for using the TrueNAS Community Edition issue tracker! TrueNAS Enterprise users receive direct support for their reports from our support portal.

Incus instance parser breaks on some values for device sizes

Description

Developer Description of problem
The fix for https://ixsystems.atlassian.net/browse/NAS-133854 which was an enhancement request to present the root disk size in API responses for the webui has caused a regression that can break virt.instance.query results because the initial fix does not account for possibility that root device size may be strings such as 32GiB or 32768MiB (in addition to straight count of bytes).

Although we don’t explicitly set these sorts of values through our API, they are supported by backend and failure to properly parse causes widespread UI / API breakage.


Original Ticket Description:
1. No idea
2. No idea
3. No idea

sorry for the crap bug post love the video blog, keep it up!

Session ID: 0dc38bf8-e463-fd64-8f3b-79042aaf5a2e

Problem/Justification

None

Impact

None

Activity

Show:

Mark J 2 hours ago

removed the incus instances, didn’t really need them and it looks like it fixed the issue.

I was just having issues with getting home assistant running which is why I was fiddling w shell.

Thanks for the heads up on my incus error slightly smiling face

Mark J 7 hours ago

Oof - missed that I guess. Too much of a casual relationship with the shell I guess.

If I reformat the TrueNAS OS, and import the configuration, will this problem persist?

Andrew Walker 8 hours ago
Edited

Well, you can edit your root disk size via incus commands and change it to “34359738368” instead of 32GiB.

 

before the documentation was written about not going outside of the UI - but I could be wrong.

The MoTD when you have shell access to TrueNAS is:

Warning: the supported mechanisms for making configuration changes are the TrueNAS WebUI, CLI, and API exclusively. ALL OTHERS ARE NOT SUPPORTED AND WILL RESULT IN UNDEFINED BEHAVIOR AND MAY RESULT IN SYSTEM FAILURE.

This has been the case for several years.

You can try doing roughly what I described above, but that aspect (fixing your system) is outside of scope for this bug ticket. You can ask for help on the community forums if you have problems figuring out how to repair the incus config.

Mark J 10 hours ago

Yes, I believe I made the changes in CLI, before the documentation was written about not going outside of the UI - but I could be wrong.

Is there anything I can do besides backing up the configuration and reformatting the boot disk?

Andrew Walker 18 hours ago

return await func(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/virt/instance.py\", line 100, in query\n entry['root_disk_size'] = int(size) if size else None\n ^^^^^^^^^\nValueError: invalid literal for int() with base 10: '32GiB'"

Did you perhaps manually edit your incus instances or run scripts against them outside of our UI?

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Impact

Critical

Department

Middleware

Components

Priority

More fields

Katalon Platform

Created 21 hours ago
Updated 2 hours ago