diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-04 16:22:47 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-06-05 13:12:46 +0000 |
commit | 05c366e2ea93d1f7739054bf723d9e3441245733 (patch) | |
tree | a4029aa9ff4b4eb44b37be8aeadda96d33a53f29 /morphlib/plugins/deploy_plugin.py | |
parent | e4ec4af6a2056bb5912aabac453d8e0c58d8a38e (diff) | |
download | morph-05c366e2ea93d1f7739054bf723d9e3441245733.tar.gz |
S7904: Add disk space checks before build & deploy
The same check that cachedir and tempdir are large enough is used
for both build and build-morphology.
Deploy only checks for tempdir being large enough.
Diffstat (limited to 'morphlib/plugins/deploy_plugin.py')
-rw-r--r-- | morphlib/plugins/deploy_plugin.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/morphlib/plugins/deploy_plugin.py b/morphlib/plugins/deploy_plugin.py index 7a6f2b92..574a5e04 100644 --- a/morphlib/plugins/deploy_plugin.py +++ b/morphlib/plugins/deploy_plugin.py @@ -66,6 +66,15 @@ class DeployPlugin(cliapp.Plugin): raise cliapp.AppException( 'Too few arguments to deploy command (see help)') + # Raise an exception if there is not enough space in tempdir + # / for the path and 0 for the minimum size is a no-op + # it exists because it is complicated to check the available + # disk space given dirs may be on the same device + morphlib.util.check_disk_available( + self.app.settings['tempdir'], + self.app.settings['tempdir-min-space'], + '/', 0) + deployment_type = args[0] system_name = args[1] location = args[2] |