~lijie-ren/appscale/bulkloader-on-appscale

« back to all changes in this revision

Viewing changes to AppDB/mysql/mysql_helper.rb

  • Committer: Chris Bunch
  • Date: 2010-08-12 00:50:22 UTC
  • mfrom: (546.1.4 appscale)
  • Revision ID: cgb@cs.ucsb.edu-20100812005022-15g08rn195xhuy81
merged back to main branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
require 'helperfunctions'
4
4
 
5
5
DB_PORT = 3306
 
6
MGMD_PORT = 1186
6
7
 
7
8
def get_uaserver_ip()
8
9
  Djinn.get_nearest_db_ip
107
108
  # start ndb server
108
109
  Djinn.log_debug(`rm -rf /var/appscale/mysql-cluster`)
109
110
  Djinn.log_debug(`mkdir -p /var/appscale/mysql-cluster/backup`)
110
 
  Djinn.log_debug(`service mysql-ndb start`)
111
 
 
112
111
  master_ip = Djinn.get_db_master_ip
 
112
  HelperFunctions.sleep_until_port_is_open(master_ip, MGMD_PORT)
 
113
  Djinn.log_debug(`service mysql-ndb start`)
 
114
 
113
115
  HelperFunctions.sleep_until_port_is_open(master_ip, DB_PORT)
114
116
  # start API node after the master
115
117
  Djinn.log_debug(`service mysql start`)