Pod hints do not include hugepage data

Bug #1897996 reported by Caleb Ellis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Alberto Donato

Bug Description

The pod websocket object has "hints" for some of its properties, namely allocated/free cores/memory/storage. However the values for memory do not take into account any hugepage memory, leading to inconsistencies in the values shown in the KVM list and the KVM details pages.

Similarly, a machine that is the host of a LXD pod will have the non-hugepage memory total shown in the machine list.

It would be good if the hints could be updated to include hugepage memory, if applicable.

Related branches

Alberto Donato (ack)
Changed in maas:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Alberto Donato (ack) wrote :

Memory in pod hints should indeed include all the memory, not just the general one when there's hugepages. I'll fix that.

For machines that are LXD pods, the machine memory reported in the machine listing (or details) page should be the total (discovered on commissioning), so it shouldn't include hugepages.

Changed in maas:
assignee: nobody → Alberto Donato (ack)
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

Here's a JSON pastebin of actual v expected with only the relevant bits: https://pastebin.canonical.com/p/x3mbfbMbdY/

But yeah basically the values for pod.total.memory, pod.available.memory and pod.used.memory don't take into account hugepage memory.

Revision history for this message
Alberto Donato (ack) wrote :

So, the total memory reported by the resources binary includes both general and hugepages memory.

The issue with wrong counts turns out to be that when computing the "free" general memory, the reserved hugepages memory for the node should be subtracted.

Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Lee Trager (ltrager)
Changed in maas:
status: Fix Committed → Fix Released
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.