Esempio n. 1
0
 def startServer(self):
     """
     start iserver
     """
     buildpath = Command.checkPath(self.buildInstallPath)+self.buildno+"/"+self.buildversion+"/BIN/"+self.OS+"/bin/"  
     Command.executeScreenSsh("", self.client, self.server) 
     Command.executeScreenSsh("cd " + buildpath, self.client, self.server)
     Command.executeScreenSsh("", self.client, self.server)
     Command.executeScreenSsh("./mstrsvr", self.client, self.server)
     if self.getScreenInfo().lower().find("command not found") == -1:
         return self.RUNNING
     else:
         self.stat = self.FAILED
         self.info = "the build install path "+buildpath+" is wrong,can not find mstrsver"
         if self.logflag == True:
             self.logger.log(self.info)
         return self.FAILED
Esempio n. 2
0
 def execute(self, State):
     """
     this method start the iserver
     """
     #init the variables.
     self.init(State)
     if self.logflag == True:
         self.logger.log(self.info)
     
     # start Linux iserver.
     if self.OS == "Linux":
         # 1.connect to Linux machine
         self = Command.getClient(self)
         if self.stat == self.FAILED:
             return self.FAILED
         
         # 2.check if screen command is avaiable
         screencommand = "screen -ls"
         self = Command.checkLinuxCommand(self,screencommand)
         if self.stat == self.FAILED:
             return self.FAILED
         
         # 3.set the screen log file path:
         self.createScreenPath()
         
         # 4.check if screen exist and create one if not, screen with name of the server
         self.createScreen()
          
         # 5.change the SHELL to tcsh
         Command.executeScreenSsh("", self.client, self.server)
         Command.executeScreenSsh("tcsh", self.client, self.server)
         
         # 6.set the limit
         Command.executeScreenSsh("", self.client, self.server)
         Command.executeScreenSsh("limit coredumpsize unlimited", self.client, self.server)
         
         # 7.check the disk space of the build path
         if self.forcecorespacecheck == "TRUE":
             if self.checkCoreDiskSpace() == self.RUNNING:
                 if self.startServer() == self.RUNNING:
                     pass
                 else:
                     return self.FAILED
             else:
                 return self.ABORT
         else:
             if self.startServer() == self.RUNNING:
                 pass
             else:
                 return self.FAILED   
              
         # 8.check if server started.
         if self.checkServerStart() == self.PASS:
             return self.PASS
         else:
             return self.FAILED 
         # # 5.install build, have two method:
         #     use pre-created shell script
         #     use copyto.pl
         # 6.config the dsn(for the dsn of mysql, whcih need copy the old file)
         # 7.config the md 
         # 8.set the mstrdiag,two ways:
         #     use in-house tool
         #     change the MSIreg.reg
         # 9.copy the config file and delta.
     else:
         # if os is windows.
         c = rpyc.classic.connect(State.get("server"))  
         rsub = c.modules.subprocess
         rsub.system("\"" + State.get("buildpath") + "MSTRSvr2_64.exe\"")