Exemple #1
0
      
      try:
        # Copy the deployment logs in logsHome to the S3 bucket for logs.
        self.exportLogs(self.ICPDeploymentLogsBucketName,self.stackName,self.logsHome)
      except Exception, e:
        TR.error(methodName,"Exception: %s" % e, e)
        self.rc = 1
      #endTry

      endTime = Utilities.currentTimeMillis()
      elapsedTime = (endTime - beginTime)/1000
      etm, ets = divmod(elapsedTime,60)
      eth, etm = divmod(etm,60) 
      
      if (self.rc == 0):
        TR.info(methodName,"NINIT0103I END Node initialization AWS ICP Quickstart.  Elapsed time (hh:mm:ss): %d:%02d:%02d" % (eth,etm,ets))
      else:
        TR.info(methodName,"NINIT0104I FAILED END Node initialization AWS ICP Quickstart.  Elapsed time (hh:mm:ss): %d:%02d:%02d" % (eth,etm,ets))
      #endIf
      
    #endTry

    if (TR.traceFile):
      TR.closeTraceLog()
    #endIf

    sys.exit(self.rc)
  #endDef

#endClass
Exemple #2
0
            try:
                # Copy icpHome/logs to the S3 bucket for logs.
                self.logExporter.exportLogs("%s/cluster/logs" % self.icpHome)
            except Exception, e:
                TR.error(methodName, "ERROR: %s" % e, e)
                self.rc = 1
            #endTry

            endTime = Utilities.currentTimeMillis()
            elapsedTime = (endTime - beginTime) / 1000
            etm, ets = divmod(elapsedTime, 60)
            eth, etm = divmod(etm, 60)

            if (self.rc == 0):
                TR.info(
                    methodName,
                    "BOOT0103I SUCCESS END Boostrap AWS ICPD Quickstart.  Elapsed time (hh:mm:ss): %d:%02d:%02d"
                    % (eth, etm, ets))
            else:
                TR.info(
                    methodName,
                    "BOOT0104I FAILED END Boostrap AWS ICPD Quickstart.  Elapsed time (hh:mm:ss): %d:%02d:%02d"
                    % (eth, etm, ets))
            #endIf

            try:
                # Copy the bootstrap logs to the S3 bucket for logs.
                self.logExporter.exportLogs(self.logsHome)
            except Exception, e:
                TR.error(methodName, "ERROR: %s" % e, e)
                self.rc = 1
            #endTry