VMHost interfaces reported multiple times for virsh

Bug #1943573 reported by Alberto Donato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato
3.0
Fix Committed
High
Alberto Donato

Bug Description

When reporting resources for a virsh pod, interfaces are included multiple times.

It seems multiple entries are created for interfaces and never cleaned up.

{
 "type": 1,
 "request_id": 8,
 "rtype": 0,
 "result": {
  "id": 1,
  "created": "Tue, 25 May. 2021 07:59:07",
  "updated": "Tue, 14 Sep. 2021 10:40:32",
  "ip_address": 4,
  "name": "virsh",
  "version": "6.0.0",
  "architectures": [
   "amd64/generic"
  ],
  "capabilities": [
   "composable",
   "dynamic_local_storage",
   "over_commit",
   "storage_pools"
  ],
  "cpu_speed": 2382,
  "pool": 0,
  "zone": 1,
  "tags": [
   "pod-console-logging",
   "virtual"
  ],
  "cpu_over_commit_ratio": 1,
  "memory_over_commit_ratio": 1,
  "default_macvlan_mode": null,
  "permissions": [
   "edit",
   "delete",
   "compose"
  ],
  "type": "virsh",
  "storage_pools": [
   {
    "id": "5cf7f798-ded1-4997-a5c9-7ded8505e064",
    "name": "maas",
    "type": "dir",
    "path": "/var/lib/libvirt/maas-images",
    "total": 489479471104,
    "used": 8000000000,
    "available": 481479471104
   }
  ],
  "default_storage_pool": "5cf7f798-ded1-4997-a5c9-7ded8505e064",
  "host": null,
  "resources": {
   "cores": {
    "allocated_tracked": 2,
    "allocated_other": 0,
    "free": 2
   },
   "memory": {
    "hugepages": {
     "allocated_tracked": 0,
     "allocated_other": 0,
     "free": 0
    },
    "general": {
     "allocated_tracked": 2147483648,
     "allocated_other": 0,
     "free": 14482931712
    }
   },
   "storage": {
    "allocated_tracked": 8000000000,
    "allocated_other": 0,
    "free": 481479471104
   },
   "vm_count": {
    "tracked": 1,
    "other": 0
   },
   "interfaces": [
    {
     "id": 4,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 22,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 209,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 212,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 217,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 218,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 219,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 268,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    },
    {
     "id": 272,
     "name": "eth0",
     "numa_index": null,
     "virtual_functions": {
      "allocated_tracked": 0,
      "allocated_other": 0,
      "free": 0
     }
    }
   ],
   "vms": [
    {
     "id": 7,
     "system_id": "bcm7pd",
     "memory": 2147483648,
     "hugepages_backed": false,
     "unpinned_cores": 2,
     "pinned_cores": []
    }
   ],
   "numa": []
  },
  "power_parameters": {
   "power_pass": "ubuntu",
   "power_address": "qemu+ssh://ubuntu@10.45.222.116/system"
  },
  "attached_vlans": [],
  "boot_vlans": []
 }
}

Related branches

Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Bill Wear (billwear)
Changed in maas:
milestone: next → 3.1.0-beta1
Bill Wear (billwear)
Changed in maas:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers