Skip to content

Incorrect LINSTOR pool size reporting #1917

@bensmrs

Description

@bensmrs

Is there an existing issue for this?

  • There is no existing issue for this bug

Is this happening on an up to date version of Incus?

  • This is happening on a supported version of Incus

Incus system details

Not relevant here

Instance details

No response

Instance log

No response

Current behavior

The LINSTOR driver uses the query-size-info API endpoint. Unbeknownst to us driver devs, it does not really behave as we’d expect. What it really does is give the minimum available space on any single node. While the info is not technically wrong for a balanced pool, it’s probably not what users would expect.

Expected behavior

We should iterate over the storage pools to find the available space, but we may need to take into consideration additional limitations set on the resource group (I don’t know if that can happen).
@luissimas, what do you think we should do? Get the storage pool from the resource group, iterate over the node-specific storage pools, and sum the values?

Steps to reproduce

root@sirius5:/home/ben# linstor rg qsi shared
╭──────────────────────────────────────────────────────────────────╮
┊ MaxVolumeSize ┊ AvailableSize ┊  Capacity ┊ Next Spawn Result    ┊
╞══════════════════════════════════════════════════════════════════╡
┊    461.25 TiB ┊     23.06 TiB ┊ 23.25 TiB ┊ incus on sirius4-sto ┊
┊               ┊               ┊           ┊ incus on sirius5-sto ┊
╰──────────────────────────────────────────────────────────────────╯
root@sirius5:/home/ben# linstor sp l -s "$(linstor -m rg l -rshared | jq -r .[0][0].select_filter.storage_pool)"
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
┊ StoragePool ┊ Node        ┊ Driver   ┊ PoolName      ┊ FreeCapacity ┊ TotalCapacity ┊ CanSnapshots ┊ State ┊ SharedName        ┊
╞════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╡
┊ incus       ┊ sirius3-sto ┊ ZFS_THIN ┊ linstor-incus ┊    23.06 TiB ┊     23.25 TiB ┊ True         ┊ Ok    ┊ sirius3-sto;incus ┊
┊ incus       ┊ sirius4-sto ┊ ZFS_THIN ┊ linstor-incus ┊    23.06 TiB ┊     23.25 TiB ┊ True         ┊ Ok    ┊ sirius4-sto;incus ┊
┊ incus       ┊ sirius5-sto ┊ ZFS_THIN ┊ linstor-incus ┊    23.06 TiB ┊     23.25 TiB ┊ True         ┊ Ok    ┊ sirius5-sto;incus ┊
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions