commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/2acb664c5185/ Changeset: 2acb664c5185 Branch: next-stable User: natefoo Date: 2013-08-05 22:06:31 Summary: Don't allow exceptions in set_metadata.py to hang the process when the distributed object store's free space monitor is in use. Also, don't run the monitor unless the object store is started inside the Galaxy application. Affected #: 2 files diff -r a2fcb4655e0faa0bebb062a54cad05e448ed6c51 -r 2acb664c5185727bfbf37166dbdcef4cb30eb797 lib/galaxy/app.py --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -54,7 +54,7 @@ from tool_shed.galaxy_install.migrate.check import verify_tools verify_tools( self, db_url, kwargs.get( 'global_conf', {} ).get( '__file__', None ), self.config.database_engine_options ) # Object store manager - self.object_store = build_object_store_from_config(self.config) + self.object_store = build_object_store_from_config(self.config, fsmon=True) # Setup the database engine and ORM from galaxy.model import mapping self.model = mapping.init( self.config.file_path, diff -r a2fcb4655e0faa0bebb062a54cad05e448ed6c51 -r 2acb664c5185727bfbf37166dbdcef4cb30eb797 lib/galaxy/objectstore/__init__.py --- a/lib/galaxy/objectstore/__init__.py +++ b/lib/galaxy/objectstore/__init__.py @@ -864,7 +864,7 @@ store selected randomly, but with weighting. """ - def __init__(self, config): + def __init__(self, config, fsmon=False): super(DistributedObjectStore, self).__init__() self.distributed_config = config.distributed_object_store_config_file assert self.distributed_config is not None, "distributed object store ('object_store = distributed') " \ @@ -881,9 +881,10 @@ self.__parse_distributed_config(config) self.sleeper = None - if self.global_max_percent_full or filter(lambda x: x != 0.0, self.max_percent_full.values()): + if fsmon and ( self.global_max_percent_full or filter( lambda x: x != 0.0, self.max_percent_full.values() ) ): self.sleeper = Sleeper() self.filesystem_monitor_thread = threading.Thread(target=self.__filesystem_monitor) + self.filesystem_monitor_thread.setDaemon( True ) self.filesystem_monitor_thread.start() log.info("Filesystem space monitor started") @@ -1020,7 +1021,7 @@ def __init__(self, backends=[]): super(HierarchicalObjectStore, self).__init__() -def build_object_store_from_config(config): +def build_object_store_from_config(config, fsmon=False): """ Depending on the configuration setting, invoke the appropriate object store """ store = config.object_store @@ -1029,7 +1030,7 @@ elif store == 's3' or store == 'swift': return S3ObjectStore(config=config) elif store == 'distributed': - return DistributedObjectStore(config=config) + return DistributedObjectStore(config=config, fsmon=fsmon) elif store == 'hierarchical': return HierarchicalObjectStore() else: https://bitbucket.org/galaxy/galaxy-central/commits/6053d0aa63cc/ Changeset: 6053d0aa63cc Branch: next-stable User: natefoo Date: 2013-08-05 22:06:55 Summary: Bug fix for job recovery in the Condor runner. Affected #: 1 file diff -r 2acb664c5185727bfbf37166dbdcef4cb30eb797 -r 6053d0aa63cc1e9f295c7a36787d064d754de7ef lib/galaxy/jobs/runners/condor.py --- a/lib/galaxy/jobs/runners/condor.py +++ b/lib/galaxy/jobs/runners/condor.py @@ -246,12 +246,12 @@ if job_id is None: self.put( job_wrapper ) return - cjs = CondorJobState() + cjs = CondorJobState( job_wrapper=job_wrapper, files_dir=self.app.config.cluster_files_directory ) cjs.job_id = str( job_id ) cjs.command_line = job.get_command_line() cjs.job_wrapper = job_wrapper cjs.job_destination = job_wrapper.job_destination - cjs.user_log = os.path.join( self.app.config.cluster_files_directory, '%s.condor.log' % galaxy_id_tag ) + cjs.user_log = os.path.join( self.app.config.cluster_files_directory, 'galaxy_%s.condor.log' % galaxy_id_tag ) cjs.register_cleanup_file_attribute( 'user_log' ) self.__old_state_paths( cjs ) if job.state == model.Job.states.RUNNING: @@ -268,9 +268,9 @@ files in the AsychronousJobState object """ if cjs.job_wrapper is not None: - user_log = "%s/%s.condor.log" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - if not os.path.exists( cjs.job_file ) and os.path.exists( job_file ): - cjs.output_file = "%s/%s.o" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - cjs.error_file = "%s/%s.e" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - cjs.job_file = "%s/galaxy_%s.sh" % (self.app.config.cluster_files_directory, job_wrapper.job_id) + user_log = "%s/%s.condor.log" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) + if not os.path.exists( cjs.user_log ) and os.path.exists( user_log ): + cjs.output_file = "%s/%s.o" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) + cjs.error_file = "%s/%s.e" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) + cjs.job_file = "%s/galaxy_%s.sh" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) cjs.user_log = user_log https://bitbucket.org/galaxy/galaxy-central/commits/927bea0f9ae7/ Changeset: 927bea0f9ae7 User: natefoo Date: 2013-08-05 22:08:10 Summary: Merge next-stable. Affected #: 3 files diff -r bd469f8d2944f2719fb4fca7078e06e6411c86a3 -r 927bea0f9ae7077b5ed821968a772add98466db7 lib/galaxy/app.py --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -54,7 +54,7 @@ from tool_shed.galaxy_install.migrate.check import verify_tools verify_tools( self, db_url, kwargs.get( 'global_conf', {} ).get( '__file__', None ), self.config.database_engine_options ) # Object store manager - self.object_store = build_object_store_from_config(self.config) + self.object_store = build_object_store_from_config(self.config, fsmon=True) # Setup the database engine and ORM from galaxy.model import mapping self.model = mapping.init( self.config.file_path, diff -r bd469f8d2944f2719fb4fca7078e06e6411c86a3 -r 927bea0f9ae7077b5ed821968a772add98466db7 lib/galaxy/jobs/runners/condor.py --- a/lib/galaxy/jobs/runners/condor.py +++ b/lib/galaxy/jobs/runners/condor.py @@ -246,12 +246,12 @@ if job_id is None: self.put( job_wrapper ) return - cjs = CondorJobState() + cjs = CondorJobState( job_wrapper=job_wrapper, files_dir=self.app.config.cluster_files_directory ) cjs.job_id = str( job_id ) cjs.command_line = job.get_command_line() cjs.job_wrapper = job_wrapper cjs.job_destination = job_wrapper.job_destination - cjs.user_log = os.path.join( self.app.config.cluster_files_directory, '%s.condor.log' % galaxy_id_tag ) + cjs.user_log = os.path.join( self.app.config.cluster_files_directory, 'galaxy_%s.condor.log' % galaxy_id_tag ) cjs.register_cleanup_file_attribute( 'user_log' ) self.__old_state_paths( cjs ) if job.state == model.Job.states.RUNNING: @@ -268,9 +268,9 @@ files in the AsychronousJobState object """ if cjs.job_wrapper is not None: - user_log = "%s/%s.condor.log" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - if not os.path.exists( cjs.job_file ) and os.path.exists( job_file ): - cjs.output_file = "%s/%s.o" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - cjs.error_file = "%s/%s.e" % (self.app.config.cluster_files_directory, job_wrapper.job_id) - cjs.job_file = "%s/galaxy_%s.sh" % (self.app.config.cluster_files_directory, job_wrapper.job_id) + user_log = "%s/%s.condor.log" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) + if not os.path.exists( cjs.user_log ) and os.path.exists( user_log ): + cjs.output_file = "%s/%s.o" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) + cjs.error_file = "%s/%s.e" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) + cjs.job_file = "%s/galaxy_%s.sh" % (self.app.config.cluster_files_directory, cjs.job_wrapper.job_id) cjs.user_log = user_log diff -r bd469f8d2944f2719fb4fca7078e06e6411c86a3 -r 927bea0f9ae7077b5ed821968a772add98466db7 lib/galaxy/objectstore/__init__.py --- a/lib/galaxy/objectstore/__init__.py +++ b/lib/galaxy/objectstore/__init__.py @@ -864,7 +864,7 @@ store selected randomly, but with weighting. """ - def __init__(self, config): + def __init__(self, config, fsmon=False): super(DistributedObjectStore, self).__init__() self.distributed_config = config.distributed_object_store_config_file assert self.distributed_config is not None, "distributed object store ('object_store = distributed') " \ @@ -881,9 +881,10 @@ self.__parse_distributed_config(config) self.sleeper = None - if self.global_max_percent_full or filter(lambda x: x != 0.0, self.max_percent_full.values()): + if fsmon and ( self.global_max_percent_full or filter( lambda x: x != 0.0, self.max_percent_full.values() ) ): self.sleeper = Sleeper() self.filesystem_monitor_thread = threading.Thread(target=self.__filesystem_monitor) + self.filesystem_monitor_thread.setDaemon( True ) self.filesystem_monitor_thread.start() log.info("Filesystem space monitor started") @@ -1020,7 +1021,7 @@ def __init__(self, backends=[]): super(HierarchicalObjectStore, self).__init__() -def build_object_store_from_config(config): +def build_object_store_from_config(config, fsmon=False): """ Depending on the configuration setting, invoke the appropriate object store """ store = config.object_store @@ -1029,7 +1030,7 @@ elif store == 's3' or store == 'swift': return S3ObjectStore(config=config) elif store == 'distributed': - return DistributedObjectStore(config=config) + return DistributedObjectStore(config=config, fsmon=fsmon) elif store == 'hierarchical': return HierarchicalObjectStore() else: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org