[2.5] Storage pools inconsistent usage in backend vs api

Bug #1797597 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Blake Rouse

Bug Description

API reports:

        "storage_pools": [
            {
                "id": "ff63cd04-0aa6-4271-893f-ca432a1b3cc0",
                "name": "maas",
                "type": "dir",
                "path": "/var/lib/libvirt/maas-images",
                "total": 117082529792,
                "used": 0,
                "available": 117082529792,
                "default": true
            }
        ],

But the storage pool reports:

ubuntu@node04:~$ virsh pool-list --all --details
 Name State Autostart Persistent Capacity Allocation Available
--------------------------------------------------------------------------
 maas running yes yes 109.04 GiB 5.88 GiB 103.16 GiB

ubuntu@node04:~$ virsh pool-info maas
Name: maas
UUID: ff63cd04-0aa6-4271-893f-ca432a1b3cc0
State: running
Persistent: yes
Autostart: yes
Capacity: 109.04 GiB
Allocation: 5.88 GiB
Available: 103.16 GiB

ubuntu@node04:~$ virsh pool-dumpxml maas
<pool type='dir'>
  <name>maas</name>
  <uuid>ff63cd04-0aa6-4271-893f-ca432a1b3cc0</uuid>
  <capacity unit='bytes'>117082529792</capacity>
  <allocation unit='bytes'>6310879232</allocation>
  <available unit='bytes'>110771650560</available>
  <source>
  </source>
  <target>
    <path>/var/lib/libvirt/maas-images</path>
    <permissions>
      <mode>0711</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

Looking at this, I can determine this:

* dumpxml seems to be showing the capacity of the disk itself where this storage pool leaves.
* pool-info - shows teh actual usage stats in the disk.

Tags: pod
Changed in maas:
milestone: none → 2.5.0rc1
importance: Undecided → High
status: New → Triaged
tags: added: pod
description: updated
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0
Changed in maas:
milestone: 2.5.0 → 2.5.0rc1
assignee: nobody → Blake Rouse (blake-rouse)
Revision history for this message
Blake Rouse (blake-rouse) wrote :

I am confused it on the bug. It seems that the size of 117082529792 is correct for the storage pool. The used/available is what MAAS knows about, meaning MAAS uses the block devices in MAAS to calculate the used/available. MAAS does not store the used in the model, that is calculated based on the block devices created in the pool in MAAS.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

The problem with that is that MAAS doesn't really know what an available storage pool size is.

For example, the total size on the storage pool is:

 "total": 117082529792,

With that, since no VMs have been yet created, says that the available size of the storage pool is:

          "available": 117082529792,

However, when you look at libvirt, it actually tells you what's *really* available, vs whats the full size:

Available: 103.16 GiB

Or

 <available unit='bytes'>110771650560</available>

So, while MAAS may be tracking the full size of the storage pool, it doesn't really mean that the storage pool has all the storage available. IN this case, libvirt is actually telling us that not all storage is available but MAAS /thinks/ it is.

Changed in maas:
milestone: 2.5.0rc1 → 2.5.0rc2
Changed in maas:
milestone: 2.5.0rc2 → 2.6.0
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.