builder: log insufficent disk space location

When creating a builder with the default settings and a small root
partition "/", kojid will fail to come up because /var/lib/mock is on
the root partition.

Prior to this change, kojid would log a messages to the systemd journal
about the insufficent disk space, but it did not make it obvious which
directory should have more disk space. Add the buildroot location to
this log message, so the administrator can more easily understand what
to change.
This commit is contained in:
Ken Dreyer 2019-07-05 15:13:18 -06:00 committed by Tomas Kopecek
parent d1b40ae939
commit 95fcac7ca5

View file

@ -1145,7 +1145,7 @@ class TaskManager(object):
availableMB = available // 1024 // 1024
self.logger.debug("disk space available in '%s': %i MB", br_path, availableMB)
if availableMB < self.options.minspace:
self.status = "Insufficient disk space: %i MB, %i MB required" % (availableMB, self.options.minspace)
self.status = "Insufficient disk space at %s: %i MB, %i MB required" % (br_path, availableMB, self.options.minspace)
self.logger.warn(self.status)
return False
return True