Adding mariadb service management
This commit is contained in:
parent
76120e1411
commit
c1ff249d3e
|
@ -6,8 +6,8 @@ def getMemoryPercentage(percent):
|
||||||
percent = int(percent)
|
percent = int(percent)
|
||||||
totalMemory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
|
totalMemory = os.sysconf('SC_PAGE_SIZE') * os.sysconf('SC_PHYS_PAGES')
|
||||||
memoryToUse = (totalMemory*percent)/100
|
memoryToUse = (totalMemory*percent)/100
|
||||||
memoryMb = memoryToUse/(1024.**2)
|
memoryMb = int(memoryToUse/(1024.**2))
|
||||||
return "{0}M".format(int(memoryMb))
|
return "{0}M".format(memoryMb)
|
||||||
except:
|
except:
|
||||||
return "Error during memory percentage calculation"
|
return "Error during memory percentage calculation"
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<files>
|
<files>
|
||||||
<file filelist='dbCluster' name='/etc/mysql/conf.d/galera.cnf' rm='True' mkdir='True'/>
|
<file filelist='dbCluster' name='/etc/mysql/conf.d/galera.cnf' rm='True' mkdir='True'/>
|
||||||
<file filelist='dbTunning' name='/etc/mysql/conf.d/tunning.cnf' rm='True' mkdir='True'/>
|
<file filelist='dbTunning' name='/etc/mysql/conf.d/tunning.cnf' rm='True' mkdir='True'/>
|
||||||
|
<service servicelist='bdd'>mariadb</service>
|
||||||
<service_access service='mariadb'>
|
<service_access service='mariadb'>
|
||||||
<port service_accesslist='mariadb' protocol='tcp'>3306</port>
|
<port service_accesslist='mariadb' protocol='tcp'>3306</port>
|
||||||
<tcpwrapper service_accesslist='mariadb'>mariadb</tcpwrapper>
|
<tcpwrapper service_accesslist='mariadb'>mariadb</tcpwrapper>
|
||||||
|
@ -153,6 +154,14 @@
|
||||||
<param name='mismatch'>""</param>
|
<param name='mismatch'>""</param>
|
||||||
</fill>
|
</fill>
|
||||||
|
|
||||||
|
<condition name='disabled_if_in' source="dbEnable">
|
||||||
|
<param>non</param>
|
||||||
|
<target type='family'>Database Cluster</target>
|
||||||
|
<target type='family'>Database</target>
|
||||||
|
<target type='service_accesslist'>dbCluster</target>
|
||||||
|
<target type='servicelist'>bdd</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<condition name='disabled_if_in' source="dbCreateFixAdmin">
|
<condition name='disabled_if_in' source="dbCreateFixAdmin">
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
<target type='variable'>accName</target>
|
<target type='variable'>accName</target>
|
||||||
|
@ -167,13 +176,6 @@
|
||||||
<target type='filelist'>dbCluster</target>
|
<target type='filelist'>dbCluster</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
<condition name='disabled_if_in' source="dbEnable">
|
|
||||||
<param>non</param>
|
|
||||||
<target type='family'>Database Cluster</target>
|
|
||||||
<target type='family'>Database</target>
|
|
||||||
<target type='service_accesslist'>dbCluster</target>
|
|
||||||
</condition>
|
|
||||||
|
|
||||||
<condition name='disabled_if_in' source="dbCacheQueryEnable">
|
<condition name='disabled_if_in' source="dbCacheQueryEnable">
|
||||||
<param>non</param>
|
<param>non</param>
|
||||||
<target type='variable'>dbQueryCacheLimit</target>
|
<target type='variable'>dbQueryCacheLimit</target>
|
||||||
|
|
Loading…
Reference in New Issue