curtin fast installer tries to match swap with memory

Bug #1427164 reported by Jonathan Davies
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned
curtin
Invalid
High
Unassigned

Bug Description

Using the curtin fast installer on a box with a significant amount of memory (say: 500G), and curtin tries to match the memory with the swap space.

This caused a compute node with 100G of disk to have 99G of swap space and a 1G / partition.

MAAS version: 1.5.4+bzr2294-0ubuntu1.3.

Changed in maas:
status: New → Triaged
Changed in curtin:
status: New → Triaged
importance: Undecided → High
Changed in maas:
status: Triaged → Invalid
status: Invalid → Triaged
importance: Undecided → High
Changed in maas:
status: Triaged → Invalid
Revision history for this message
Blake Rouse (blake-rouse) wrote :

A work around for the moment is to either force the swap off, if you don't want it or set it to a fixed size.

Modifying /etc/maas/curtin_userdata add the following to disable

swap: None

to set a fixed size:

swap:
  size: 10G

to set a maximum size but still allow the calculation:

swap:
  maxsize: 10G

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

This seems like a bug in curtin since MAAS does not tell any machine how much swap it should install. This is automatically created and decided by curint. Ways to override this are as follows (in the curtin preseed):

Other options:

'curtin install' will now by default add a swap file of its
determined default size in /swap.img. This can be controlled
via the config by setting:
   swap:
    filename: 'swap.img',
    size: None # (or 1G)
    maxsize: 2G

Marking this bug invalid in MAAS.

Revision history for this message
Scott Moser (smoser) wrote :

I'm not sure how this could be happening.
curtin's swap logic is http://bazaar.launchpad.net/~curtin-dev/curtin/trunk/view/head:/curtin/swap.py#L44 .

It generally tries to keep the swap file of sane size by default.

Could you run this on the system and collect the output:
$ path=/
$ python -c 'import os, sys; s = os.statvfs(sys.argv[1]); print("%s / %s" % (s.f_frsize * s.f_blocks, s.f_frsize * s.f_bfree))' "$path"
$ df -k

where 'path' is the path to the mounted 100G filesystem that is mentioned.
Also, the installer log from maas attached would be nice.

Revision history for this message
Scott Moser (smoser) wrote :

Hi, I'm not sure how this can happen.
If you're able to recreate it, please provide an install log.

Changed in curtin:
status: Triaged → Incomplete
Scott Moser (smoser)
Changed in curtin:
status: Incomplete → 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.