Pod manager counts all virsh pools as available disk

Bug #1690466 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Won't Fix
High
Unassigned

Bug Description

On my laptop virsh is configured to have access to two pools which are two different directories on my system. I added virsh as a pod to MAAS but it thinks my system has double the amount of disk space. MAAS should recognize that both pools are on the same disk and only count it once.

$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/ubuntu--vg-root 463423296 280780180 159079444 64% /
/dev/sda2 241965 138970 90503 61% /boot
/dev/sda1 121982 3496 118486 3% /boot/efi

$ maas maas pods read
Success.
Machine-readable output follows:
[
    {
        "id": 1,
        "available": {
            "memory": 9778,
            "cores": 2,
            "local_storage": 914720659864
        },
        "name": "suited-gopher",
        "architectures": [
            "amd64/generic"
        ],
        "used": {
            "memory": 6144,
            "cores": 6,
            "local_storage": 34359738368
        },
        "type": "virsh",
        "resource_uri": "/MAAS/api/2.0/pods/1/",
        "capabilities": [
            "composable",
            "dynamic_local_storage",
            "over_commit"
        ],
        "total": {
            "memory": 15922,
            "cores": 8,
            "local_storage": 949080398232
        }
    }
]

$ virsh pool-list
 Name State Autostart
-------------------------------------------
 default active yes
 ISOs active yes

$ virsh pool-info default
Name: default
UUID: f2bb24f2-deca-4f87-a09d-b7eb9677671d
State: running
Persistent: yes
Autostart: yes
Capacity: 441.95 GiB
Allocation: 267.05 GiB
Available: 174.90 GiB

$ virsh pool-info ISOs
Name: ISOs
UUID: 109ba190-305d-44de-ab05-e64da6e7ae53
State: running
Persistent: yes
Autostart: yes
Capacity: 441.95 GiB
Allocation: 267.05 GiB
Available: 174.90 GiB

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
importance: Undecided → High
Revision history for this message
Blake Rouse (blake-rouse) wrote :

How are we supposed to recognize this? Looking at the virsh information you provided they both look like different pools? We can only perform virsh commands so it must be noticed in virsh not outside of virsh in anyway.

I think the real question is why do you have 2 pools pointing to the same backing? This seems more like a bad configuration in virsh then a real bug in MAAS.

Changed in maas:
assignee: Newell Jensen (newell-jensen) → nobody
status: Triaged → Incomplete
Revision history for this message
Lee Trager (ltrager) wrote :

The default virsh pool is in /var/lib/libvirt/images I want to be able to access ISOs I download in my home directory which is why I added a second pool.

You can see the path by looking at the XML.

$ virsh pool-dumpxml default
<pool type='dir'>
  <name>default</name>
  <uuid>f2bb24f2-deca-4f87-a09d-b7eb9677671d</uuid>
  <capacity unit='bytes'>474545455104</capacity>
  <allocation unit='bytes'>289206239232</allocation>
  <available unit='bytes'>185339215872</available>
  <source>
  </source>
  <target>
    <path>/var/lib/libvirt/images</path>
    <permissions>
      <mode>0711</mode>
      <owner>0</owner>
      <group>0</group>
    </permissions>
  </target>
</pool>

$ virsh pool-dumpxml ISOs
<pool type='dir'>
  <name>ISOs</name>
  <uuid>109ba190-305d-44de-ab05-e64da6e7ae53</uuid>
  <capacity unit='bytes'>474545455104</capacity>
  <allocation unit='bytes'>286747004928</allocation>
  <available unit='bytes'>187798450176</available>
  <source>
  </source>
  <target>
    <path>/home/lee/ISOs</path>
    <permissions>
      <mode>0775</mode>
      <owner>1000</owner>
      <group>1000</group>
    </permissions>
  </target>
</pool>

Lee Trager (ltrager)
Changed in maas:
status: Incomplete → Triaged
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looking at this there is still no way to tell the difference. Both point to a different path and have unique UUID. Without looking at the mount points on the system "which is not something we will do", then to MAAS this is two different storage pools.

In this case I believe this is a miss configuration of libvirt.

Changed in maas:
status: Triaged → Won't Fix
Changed in maas:
milestone: 2.2.1 → none
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.