Index: gram/jobmanager/setup/condor/condor.in =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/setup/condor/condor.in,v retrieving revision 1.15.6.4 diff -u -r1.15.6.4 condor.in --- source-trees/gt2-cvs/gram/jobmanager/setup/condor/condor.in 31 Oct 2005 18:00:52 -0000 1.15.6.4 +++ source-trees/gt2-cvs/gram/jobmanager/setup/condor/condor.in 7 Feb 2006 00:00:38 -0000 @@ -102,6 +102,14 @@ my $multi_output = 0; my $failure_text = ''; + # Reject jobs that want streaming, if so configured + if ( $description->streamingrequested() && + $description->streamingdisabled() ) { + + $self->log("Streaming is not allowed."); + return Globus::GRAM::Error::OPENING_STDOUT; + } + if($description->jobtype() eq 'single' || $description->jobtype() eq 'multiple') { Index: gram/jobmanager/setup/fork/fork.in =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/setup/fork/fork.in,v retrieving revision 1.20.4.1 diff -u -r1.20.4.1 fork.in --- source-trees/gt2-cvs/gram/jobmanager/setup/fork/fork.in 9 Jun 2005 19:34:39 -0000 1.20.4.1 +++ source-trees/gt2-cvs/gram/jobmanager/setup/fork/fork.in 7 Feb 2006 00:00:38 -0000 @@ -77,6 +77,7 @@ my $fork_starter = "$ENV{GLOBUS_LOCATION}/libexec/globus-fork-starter"; my $fork_conf = "$ENV{GLOBUS_LOCATION}/etc/globus-fork.conf"; my $log_path = '/dev/null'; + my $is_grid_monitor = 0; if (-r $fork_conf) { @@ -188,6 +189,30 @@ $description->directory() . '/' . $description->executable()); + } + + # Check if this is the Condor-G grid monitor + my $exec = $description->executable(); + my $file_out = `/usr/bin/file $exec`; + if ( $file_out =~ /script/ || $file_out =~ /text/ || + $file_out =~ m|/usr/bin/env| ) { + open( EXEC, "<$exec" ) or + return Globus::GRAM::Error::EXECUTABLE_PERMISSIONS(); + while( ) { + if ( /Sends results from the grid_manager_monitor_agent back to a/ ) { + $is_grid_monitor = 1; + } + } + close( EXEC ); + } + + # Reject jobs that want streaming, if so configured, but not for + # grid monitor jobs + if ( $description->streamingrequested() && + $description->streamingdisabled() && !$is_grid_monitor ) { + + $self->log("Streaming is not allowed."); + return Globus::GRAM::Error::OPENING_STDOUT; } @arguments = $description->arguments(); Index: gram/jobmanager/setup/lsf/lsf.in =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/setup/lsf/lsf.in,v retrieving revision 1.19.6.1 diff -u -r1.19.6.1 lsf.in --- source-trees/gt2-cvs/gram/jobmanager/setup/lsf/lsf.in 9 Jun 2005 19:34:43 -0000 1.19.6.1 +++ source-trees/gt2-cvs/gram/jobmanager/setup/lsf/lsf.in 7 Feb 2006 00:00:38 -0000 @@ -39,6 +39,14 @@ $self->log('Entering lsf submit'); + # Reject jobs that want streaming, if so configured + if ( $description->streamingrequested() && + $description->streamingdisabled() ) { + + $self->log("Streaming is not allowed."); + return Globus::GRAM::Error::OPENING_STDOUT; + } + # check jobtype if(defined($description->jobtype())) { Index: gram/jobmanager/setup/pbs/pbs.in =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/setup/pbs/pbs.in,v retrieving revision 1.18.6.3 diff -u -r1.18.6.3 pbs.in --- source-trees/gt2-cvs/gram/jobmanager/setup/pbs/pbs.in 9 Nov 2005 17:29:43 -0000 1.18.6.3 +++ source-trees/gt2-cvs/gram/jobmanager/setup/pbs/pbs.in 7 Feb 2006 00:00:38 -0000 @@ -49,6 +49,14 @@ $self->log("Entering pbs submit"); + # Reject jobs that want streaming, if so configured + if ( $description->streamingrequested() && + $description->streamingdisabled() ) { + + $self->log("Streaming is not allowed."); + return Globus::GRAM::Error::OPENING_STDOUT; + } + # check jobtype if(defined($description->jobtype())) { Index: gram/jobmanager/source/globus_gram_job_manager.h =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/source/globus_gram_job_manager.h,v retrieving revision 1.37 diff -u -r1.37 globus_gram_job_manager.h --- source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager.h 18 Apr 2005 21:39:07 -0000 1.37 +++ source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager.h 7 Feb 2006 00:00:38 -0000 @@ -357,6 +357,20 @@ globus_gass_cache_t cache_handle; char * cache_tag; + /** + * Streaming + * + * streaming_disabled is set from the config option -disable-streaming. + * The default is false. + * streaming_requested is set to true if there's at least one remote + * destination for stdout or stderr. Otherwise, it's false. + * Both values get passed to the batch system shell script to decide + * whether to allow the job. This lets admins disable streaming for + * most jobs, but allow it for certain ones (e.g. the grid monitor). + */ + globus_bool_t streaming_disabled; + globus_bool_t streaming_requested; + globus_rsl_t * stdout_position_hack; globus_rsl_t * stderr_position_hack; Index: gram/jobmanager/source/globus_gram_job_manager_output.c =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/source/globus_gram_job_manager_output.c,v retrieving revision 1.16 diff -u -r1.16 globus_gram_job_manager_output.c --- source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_output.c 18 Apr 2005 21:39:08 -0000 1.16 +++ source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_output.c 7 Feb 2006 00:00:38 -0000 @@ -1737,6 +1737,7 @@ break; case GLOBUS_GRAM_JOB_MANAGER_OUTPUT_GASS: + request->streaming_requested = GLOBUS_TRUE; rc = globus_gass_transfer_register_append( &destination->handle.gass, GLOBUS_NULL, @@ -1764,6 +1765,7 @@ break; case GLOBUS_GRAM_JOB_MANAGER_OUTPUT_FTP: + request->streaming_requested = GLOBUS_TRUE; globus_ftp_client_operationattr_init(&attr); globus_ftp_client_operationattr_set_append( &attr, --- source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_request.c Mon Jun 11 13:24:24 2007 +++ source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_request.c.new Mon Jun 11 13:24:09 2007 @@ -94,6 +94,8 @@ globus_cond_init(&r->cond, GLOBUS_NULL); r->extra_envvars = GLOBUS_NULL; r->response_context = GSS_C_NO_CONTEXT; + r->streaming_disabled = GLOBUS_FALSE; + r->streaming_requested = GLOBUS_FALSE; r->disable_duct = GLOBUS_FALSE; r->seg_module = NULL; Index: gram/jobmanager/source/globus_gram_job_manager_script.c =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/source/globus_gram_job_manager_script.c,v retrieving revision 1.13.4.1 diff -u -r1.13.4.1 globus_gram_job_manager_script.c --- source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_script.c 11 Nov 2005 21:59:44 -0000 1.13.4.1 +++ source-trees/gt2-cvs/gram/jobmanager/source/globus_gram_job_manager_script.c 7 Feb 2006 00:00:38 -0000 @@ -2049,6 +2049,11 @@ request->job_dir); } + fprintf(fp, ",\n 'streamingdisabled' => [ %d ]", + request->streaming_disabled ); + fprintf(fp, ",\n 'streamingrequested' => [ %d ]", + request->streaming_requested ); + globus_l_gram_job_manager_print_staging_list( request, fp, Index: gram/jobmanager/source/main.c =================================================================== RCS file: /home/globdev/CVS/globus-packages/gram/jobmanager/source/main.c,v retrieving revision 1.12 diff -u -r1.12 main.c --- source-trees/gt2-cvs/gram/jobmanager/source/main.c 18 Apr 2005 21:39:10 -0000 1.12 +++ source-trees/gt2-cvs/gram/jobmanager/source/main.c 7 Feb 2006 00:00:38 -0000 @@ -362,6 +362,10 @@ { request->extra_envvars = globus_libc_strdup(argv[++i]); } + else if (strcmp(argv[i], "-disable-streaming") == 0) + { + request->streaming_disabled = GLOBUS_TRUE; + } else if ((strcasecmp(argv[i], "-help" ) == 0) || (strcasecmp(argv[i], "--help") == 0)) {