Enis Afgan avatar Enis Afgan committed 1ebae42

Added master instance as an execution host to SGE

Comments (0)

Files changed (1)


         if not os.path.exists( P_SGE_TARS ):
             log.error( "'%s' directory with SGE binaries does not exist! Aborting SGE setup." % P_SGE_TARS )
             return False
+        if not os.path.exists( P_SGE_ROOT ):
+            os.mkdir ( P_SGE_ROOT )
         # Ensure SGE_ROOT directory is empty (useful for restarts)
         if len(os.listdir(P_SGE_ROOT)) > 0:
             # Check if qmaster is running in that case
             log.debug( "Attempted to get volumes, but TESTFLAG is set." )
             return None
         log.info( "Configuring SGE..." )
-        exec_nodes = "" # Execution hosts will be added later, as they start
+        # Add master as an execution host
+        # Additional execution hosts will be added later, as they start
+        exec_nodes = self.app.get_self_private_ip() 
         SGE_config_file = '%s/galaxyEC2.conf' % P_SGE_ROOT
         f = open( SGE_config_file, 'w' )
         log.debug( "Created SGE install template as file '%s'" % SGE_config_file )
         log.info( "Setting up SGE." )
-        ret_code = subprocess.call( 'cd %s; ./inst_sge -m -auto %s' % (P_SGE_ROOT, SGE_config_file), shell=True )
+        ret_code = subprocess.call( 'cd %s; ./inst_sge -m -x -auto %s' % (P_SGE_ROOT, SGE_config_file), shell=True )
         if ret_code == 0:
             log.info("Successfully setup SGE; configuring SGE")
             SGE_allq_file = '%s/all.q.conf' % P_SGE_ROOT
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.