Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1)Generate config for mysql and nova similar to fab. 2)Run DB sync only on one node. 3)Handle db sync for cinder. 4)Make check-wsrep-status to re-cluster when galera enters a bad state. 5)Mysql was connecting to 3306 instead of 33306. Change-Id: I1231ef121b846fb7b35202ab548bdc37b861a1cd
- Loading branch information
1 parent
36132f4
commit 89ee946
Showing
29 changed files
with
329 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
contrail/environment/modules/contrail/files/check-mysql-status.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import commands | ||
import sys | ||
import os.path | ||
|
||
def main(args_str=None): | ||
|
||
status,output = commands.getstatusoutput("cat /etc/contrail/mysql.token") | ||
mysql_token = output | ||
status,output = commands.getstatusoutput('service mysql status') | ||
|
||
# if status != 0: | ||
# sys.exit(0) | ||
|
||
# If we are not able to connect to mysql,its probably stucik , kill it! | ||
status,output = commands.getstatusoutput('mysql -uroot -p%s -e "show status like \'wsrep_cluster_size\'"' % mysql_token ) | ||
print "wsrep_cluster_size: %s" % output | ||
#if output.find("4") == -1: | ||
if status != 0: | ||
status,output = commands.getstatusoutput('pkill -9 mysql') | ||
|
||
if __name__ == "__main__": | ||
main(sys.argv[1:]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.