summaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
authorVu Tran <vu.tran@windriver.com>2014-05-21 09:57:33 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-05-21 13:33:24 -0400
commit6e39ff3c86f69d5c78790a1e2377a18038b44347 (patch)
tree1c1b704db1a275220a2450d4999cf2faea547713 /meta-openstack
parenta68c6e740b9e4cf297b9c33bd4ef0fda4938e7c8 (diff)
downloadmeta-cloud-services-6e39ff3c86f69d5c78790a1e2377a18038b44347.tar.gz
cinder log postinsts missing var-log-cinder
By turning on "log_dir=/var/log/cinder" in /etc/cinder/cinder.conf all cinder services require folder /var/log/cinder exist to be able to start. This folder is created through startup scripts "/etc/init.d/cinder-xxxx" However, at very first boot, cinder postinst script invokes "cinder-manage db sync" without first creating folder /var/log/cinder which causes "cinder-manage db sync" to fail with the following errors: Tue May 20 18:26:59 2014: Running postinst /etc/rpm-postinsts/114... Tue May 20 18:26:59 2014: Starting postgres server...already running. Tue May 20 18:27:01 2014: Traceback (most recent call last): Tue May 20 18:27:01 2014: File "/usr/bin/cinder-manage", line 543, in <module> Tue May 20 18:27:01 2014: main() Tue May 20 18:27:01 2014: File "/usr/bin/cinder-manage", line 523, in main Tue May 20 18:27:01 2014: logging.setup("cinder") Tue May 20 18:27:01 2014: File "/usr/lib64/python2.7/site-packages/cinder/openstack/common/log.py", line 359, in setup Tue May 20 18:27:01 2014: _setup_logging_from_conf() Tue May 20 18:27:01 2014: File "/usr/lib64/python2.7/site-packages/cinder/openstack/common/log.py", line 406, in _setup_logging_from_conf Tue May 20 18:27:01 2014: filelog = logging.handlers.WatchedFileHandler(logpath) Tue May 20 18:27:01 2014: File "/usr/lib64/python2.7/logging/handlers.py", line 386, in __init__ Tue May 20 18:27:01 2014: logging.FileHandler.__init__(self, filename, mode, encoding, delay) Tue May 20 18:27:01 2014: File "/usr/lib64/python2.7/logging/__init__.py", line 893, in __init__ Tue May 20 18:27:01 2014: StreamHandler.__init__(self, self._open()) Tue May 20 18:27:01 2014: File "/usr/lib64/python2.7/logging/__init__.py", line 912, in _open Tue May 20 18:27:01 2014: stream = open(self.baseFilename, self.mode) Tue May 20 18:27:01 2014: IOError: [Errno 2] No such file or directory: '/var/log/cinder/cinder-manage.log' So make sure "/var/log/cinder" is created before "cinder-manage db sync" is invoked. Signed-off-by: Vu Tran <vu.tran@windriver.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder_git.bb4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_git.bb b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
index f14102e..58088c9 100644
--- a/meta-openstack/recipes-devtools/python/python-cinder_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-cinder_git.bb
@@ -90,6 +90,10 @@ pkg_postinst_${SRCNAME}-setup () {
90 /etc/init.d/postgresql start 90 /etc/init.d/postgresql start
91 fi 91 fi
92 92
93 if [ ! -d /var/log/cinder ]; then
94 mkdir /var/log/cinder
95 fi
96
93 sudo -u postgres createdb cinder 97 sudo -u postgres createdb cinder
94 cinder-manage db sync 98 cinder-manage db sync
95 99