summaryrefslogtreecommitdiff
path: root/morphlib/plugins/gc_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/plugins/gc_plugin.py')
-rw-r--r--morphlib/plugins/gc_plugin.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/plugins/gc_plugin.py b/morphlib/plugins/gc_plugin.py
index df736afe..43de173e 100644
--- a/morphlib/plugins/gc_plugin.py
+++ b/morphlib/plugins/gc_plugin.py
@@ -61,6 +61,11 @@ class GCPlugin(cliapp.Plugin):
It also removes any left over temporary chunks and staging areas
from failed builds.
+ In addition we remove failed deployments, generally these are
+ cleared up by morph during deployment but in some cases they
+ won't be e.g. if morph gets a SIGKILL or the machine running
+ morph loses power.
+
'''
tempdir = self.app.settings['tempdir']
@@ -76,7 +81,7 @@ class GCPlugin(cliapp.Plugin):
def cleanup_tempdir(self, temp_path, min_space):
self.app.status(msg='Cleaning up temp dir %(temp_path)s',
temp_path=temp_path, chatty=True)
- for subdir in ('failed', 'chunks'):
+ for subdir in ('deployments', 'failed', 'chunks'):
if morphlib.util.get_bytes_free_in_path(temp_path) >= min_space:
self.app.status(msg='Not Removing subdirectory '
'%(subdir)s, enough space already cleared',