Managing "Node" mode
This commit is contained in:
parent
e87d3ccf69
commit
414154a832
@ -192,6 +192,14 @@
|
||||
<target type='variable'>dbSlowQueryLogTime</target>
|
||||
<target type='variable'>dbSlowQueryLogFile</target>
|
||||
</condition>
|
||||
|
||||
<condition name='disabled_if_in' source="dbClusterPosition">
|
||||
<param>Node</param>
|
||||
<target type='variable'>dbCreateFixAdmin</target>
|
||||
<target type='variable'>accName</target>
|
||||
<target type='variable'>accLimits</target>
|
||||
<target type='variable'>accLimitTarget</target>
|
||||
</condition>
|
||||
</constraints>
|
||||
<help/>
|
||||
</creole>
|
||||
|
@ -2,6 +2,12 @@
|
||||
|
||||
todo=$(CreoleGet dbCreateFixAdmin 'non')
|
||||
autoRepair=$(CreoleGet dbAutoOptimizeAndRepare 'non')
|
||||
role=$(CreoleGet dbClusterPosition 'Leader')
|
||||
|
||||
if [[ ${role} == 'Node' ]]
|
||||
then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ${todo} != 'non' ]]
|
||||
then
|
||||
@ -13,6 +19,9 @@ then
|
||||
tempFile=$(mktemp -p /root)
|
||||
sqlFile=$(mktemp -p /root)
|
||||
|
||||
password=$(pwgen -1 10)
|
||||
/usr/share/eole/sbin/mariaPwd ${password}
|
||||
|
||||
accounts=($(CreoleGet accName))
|
||||
limits="$(CreoleGet accLimitTarget '')"
|
||||
accLimits=(${limits// /})
|
||||
@ -55,7 +64,7 @@ then
|
||||
index=$((index+1))
|
||||
done
|
||||
|
||||
mysql < ${sqlFile}
|
||||
mysql -u root --password=${password} < ${sqlFile}
|
||||
|
||||
mv ${tempFile} ${readerfile}
|
||||
chmod 600 ${readerfile}
|
||||
@ -64,7 +73,10 @@ fi
|
||||
|
||||
if [[ ${autoRepair} == "oui" ]]
|
||||
then
|
||||
mysqlcheck -u root --auto-repair --check --optimize --all-databases
|
||||
|
||||
mysqlcheck -u root -p ${password} --auto-repair --check --all-databases
|
||||
mysqlcheck -u root -p ${password} --optimize --check --all-databases
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user