* Add script to check innodb status * Add check_mongo for when juju controllers are not working * Add script to fix group replication * Add script that fixes logrotate on nova-compute units * Fine tuning other scripts
		
			
				
	
	
		
			22 lines
		
	
	
		
			371 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			371 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash
 | 
						|
 | 
						|
NODE=$1
 | 
						|
 | 
						|
usage() { 
 | 
						|
    echo "Usage: ${0} [node-name]" 1>&2
 | 
						|
    exit 0
 | 
						|
}
 | 
						|
 | 
						|
do_gr(){
 | 
						|
    MYSQL_UNIT=${NODE}
 | 
						|
    PASSWORD=$(juju run --unit mysql-innodb-cluster/leader leader-get mysql.passwd)
 | 
						|
 | 
						|
    juju ssh $MYSQL_UNIT "sudo mysql -u root -p$PASSWORD -e \"stop group_replication; start group_replication;\""
 | 
						|
}
 | 
						|
 | 
						|
if [ $# -ne 1 ]; then
 | 
						|
    usage
 | 
						|
else
 | 
						|
    do_gr
 | 
						|
fi
 |