summaryrefslogtreecommitdiffstats
path: root/nova/service.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-01-28 17:19:11 +0000
committerGerrit Code Review <review@openstack.org>2013-01-28 17:19:11 +0000
commitf5a5ba84757a85836d78cc3d8a4f62f5ada2ac65 (patch)
tree92f1880aa28699e4070127cad9c067d6d0e1ba07 /nova/service.py
parent18708b18a73b75dbe82583b402e9d310dd135057 (diff)
parente8386a27968f5a53f97681e7caf63b2243b7ed05 (diff)
downloadnova-f5a5ba84757a85836d78cc3d8a4f62f5ada2ac65.tar.gz
nova-f5a5ba84757a85836d78cc3d8a4f62f5ada2ac65.tar.xz
nova-f5a5ba84757a85836d78cc3d8a4f62f5ada2ac65.zip
Merge "Allow users to specify a tmp location via config"
Diffstat (limited to 'nova/service.py')
-rw-r--r--nova/service.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/nova/service.py b/nova/service.py
index c250673f4..4fc12f374 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -426,6 +426,7 @@ class Service(object):
verstr = version.version_string_with_package()
LOG.audit(_('Starting %(topic)s node (version %(version)s)'),
{'topic': self.topic, 'version': verstr})
+ self.basic_config_check()
self.manager.init_host()
self.model_disconnected = False
ctxt = context.get_admin_context()
@@ -570,6 +571,16 @@ class Service(object):
ctxt = context.get_admin_context()
return self.manager.periodic_tasks(ctxt, raise_on_error=raise_on_error)
+ def basic_config_check(self):
+ """Perform basic config checks before starting processing."""
+ # Make sure the tempdir exists and is writable
+ try:
+ with utils.tempdir() as tmpdir:
+ pass
+ except Exception as e:
+ LOG.error(_('Temporary directory is invalid: %s'), e)
+ sys.exit(1)
+
class WSGIService(object):
"""Provides ability to launch API from a 'paste' configuration."""