Skip to content

Commit

Permalink
Fixes: Openstack HA , cmon monitoring script is not able to start mys…
Browse files Browse the repository at this point in the history
…ql when mysql is down after few days

Token cleanup and CMON logs cleanup is scheduled to run as a
cronjob in the midnight in all the three OpenStack controllers.
If the db is huge, it leads to WSREP lock issues leading to
data inconsistency. WSREP kills MySQL when there is data inconsistency
which leads to MySQL being killed.

To fix this, we will space out the cleanup job to run every hour.

Change-Id: I8088f18a06959eb2ef53416beb5b0bc29b44da00
Closes-Bug:1408756
  • Loading branch information
Ranjeet R committed Jan 16, 2015
1 parent 92d9080 commit da68ca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrail_provisioning/openstack/ha/galera_setup.py
Expand Up @@ -213,7 +213,7 @@ def setup_grants(self):
def setup_cron(self):
with settings(hide('everything'), warn_only=True):
local('crontab -l > %s/galera_cron' % self._temp_dir_name)
local('echo "0 0 * * * /opt/contrail/bin/contrail-token-clean.sh" >> %s/galera_cron' % self._temp_dir_name)
local('echo "0 %s * * * /opt/contrail/bin/contrail-token-clean.sh" >> %s/galera_cron' % (self._args.openstack_index, self._temp_dir_name))
local('crontab %s/galera_cron' % self._temp_dir_name)
local('rm %s/galera_cron' % self._temp_dir_name)

Expand Down

0 comments on commit da68ca8

Please sign in to comment.