Skip to content

Commit

Permalink
Merge "Create ssd_data_dir if not already done and chown to cassandra…
Browse files Browse the repository at this point in the history
… in provisioning so that cassandra does not fail while trying to create it during startup. Closes-Bug: #1502257"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Oct 2, 2015
2 parents 83c3537 + fb895f1 commit d3f4595
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrail_provisioning/database/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ def fixup_config_files(self):
if ssd_data_dir:
commit_log_dir = os.path.join(ssd_data_dir, 'commitlog')
self.replace_in_file(conf_file, 'commitlog_directory:', 'commitlog_directory: ' + commit_log_dir)
if not os.path.exists(ssd_data_dir):
local("sudo mkdir -p %s" % (ssd_data_dir))
local("sudo chown -R cassandra: %s" % (ssd_data_dir))
if analytics_data_dir:
if not data_dir:
data_dir = '/var/lib/cassandra'
Expand Down

0 comments on commit d3f4595

Please sign in to comment.