MAAS should automatically "vacuum" the database to remove deleted images.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
High
|
Unassigned |
Bug Description
In previous MAAS releases, it was observed that large objects (MAAS boot images) unlinked (deleted) from the postgresql database were not freed in a timely manner.
MAAS should either ensure these are purged every time a set of images is deleted or replaced, and/or change the settings on the postgresql database so that this happens automatically. (It seems postgresql has an 'autovacuum' feature, which is recommended, but the Debian/Ubuntu packages do not configure it by default.)
Due to requirements for vacuuming the postgresql database in order to free space that belonged to previously-used images, MAAS should be very conservative about disk usage when notifying users about this, and should be aggressive in cleaning up when low disk space conditions are detected. For example, if there are 50 GB of images on-disk on the database server and the user has 100 GB of total storage, the vacuum operation might not be possible.
See also:
bug #1660440 (should notify users when image storage is low)
bug #1660418 (uploading a custom image does not remove the old image)
bug #1459876 (original issue)
description: | updated |
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
We might consider using something like this to avoid the database locking and disk space requirements of the built-in vacuum:
https:/ /github. com/reorg/ pg_repack
We need to check if it supports large objects though.