Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamir Korem committed Feb 24, 2013
1 parent 432578e commit cd9dc8a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions services/mysql/mysql_startDetection.groovy
Expand Up @@ -61,6 +61,21 @@ println "mysql_startDetection.groovy: jdbcPort is ${config.jdbcPort} ..."
if ( ServiceUtils.isPortOccupied(config.jdbcPort) ) {
println "mysql_startDetection: port ${config.jdbcPort} is now occupied ..."
if ( config.startDetectionQuery.length() == 0 ) {
if ( config.masterSlaveMode ) {
def iAmMaster = context.attributes.thisInstance["isMaster"]
println "mysql_startDetection: iAmMaster is ${iAmMaster}..."
if ( iAmMaster ) {
if (checkMasterStatus(context,config)) {
println "mysql_startDetection: Master is ready"
context.attributes.thisService["masterIsReady"]=true
System.exit(0)
}
else {
println "mysql_startDetection: Master is NOT ready yet..."
System.exit(-1)
}
}
}
println "mysql_startDetection: startDetectionQuery is empty - service is up "
System.exit(0)
}
Expand Down

0 comments on commit cd9dc8a

Please sign in to comment.