public void checkAndSetupBootStrapInfo(DbClient dbClient){
  if (onStandby) {
    _log.info("Skip boot strap info initialization on standby site");
    return;
  }
  if (_vdcList != null && _vdcList.size() > 1) {
    _log.info("Skip root tenant check for more than one vdcs. Current number of vdcs: {}",_vdcList.size());
    return;
  }
  int retryIntervalSecs=DBINIT_RETRY_INTERVAL;
  boolean done=false;
  boolean wait;
  while (!done) {
    wait=false;
    InterProcessLock lock=null;
    try {
      lock=_coordinator.getLock(getBootstrapLockName());
      _log.info("bootstrap info check - waiting for bootstrap lock");
      lock.acquire();
      if (isGeoDbsvc()) {
        insertDefaultRootTenant(dbClient);
      }
 else {
        insertMyVdcInfo(dbClient);
        insertVdcVersion(dbClient);
        insertPasswordHistory(dbClient);
      }
      done=true;
    }
 catch (    Exception e) {
      if (e instanceof IllegalStateException) {
        throw (IllegalStateException)e;
      }
 else {
        _log.warn("Exception while checking for bootstrap info, will retry in {} secs",retryIntervalSecs,e);
        wait=true;
      }
    }
 finally {
      if (lock != null) {
        try {
          lock.release();
        }
 catch (        Exception e) {
          _log.error("Fail to release lock",e);
        }
      }
    }
    if (wait) {
      try {
        Thread.sleep(retryIntervalSecs * 1000);
      }
 catch (      InterruptedException ex) {
        _log.warn("Thread is interrupted during wait for retry",ex);
      }
    }
  }
}

public void checkAndSetupBootStrapInfo ( DbClient dbClient ) { if ( onStandby ) { _log . info ( "Skip boot strap info initialization on standby site" ) ; return ; } if ( _vdcList != null && _vdcList . size ( ) > 1 ) { _log . info ( "Skip root tenant check for more than one vdcs. Current number of vdcs: {}" , _vdcList . size ( ) ) ; return ; } int retryIntervalSecs = DBINIT_RETRY_INTERVAL ; boolean done = false ; boolean wait ; while ( ! done ) { wait = false ; InterProcessLock lock = null ; try { lock = _coordinator . getLock ( getBootstrapLockName ( ) ) ; _log . info ( "bootstrap info check - waiting for bootstrap lock" ) ; lock . acquire ( ) ; if ( isGeoDbsvc ( ) ) { insertDefaultRootTenant ( dbClient ) ; } else { insertMyVdcInfo ( dbClient ) ; insertVdcVersion ( dbClient ) ; insertPasswordHistory ( dbClient ) ; } done = true ; } catch ( Exception e ) { if ( e instanceof IllegalStateException ) { throw ( IllegalStateException ) e ; } else { _log . warn ( "Exception while checking for bootstrap info, will retry in {} secs" , retryIntervalSecs , e ) ; wait = true ; } } finally { if ( lock != null ) { try { lock . release ( ) ; } catch ( Exception e ) { _log . error ( "Fail to release lock" , e ) ; } } } if ( wait ) { try { Thread . sleep ( retryIntervalSecs * 1000 ) ; } catch ( InterruptedException ex ) { _log . warn ( "Thread is interrupted during wait for retry" , ex ) ; } } } }
init the bootstrap info , including : check and setup root tenant or my vdc info , if it doesn ' t exist
