Opened 9 years ago

Closed 7 years ago

#777 closed defect (fixed)

IZ3239: -terse option in sge_request files is ignored

Reported by: macona Owned by: Dave Love <d.love@…>
Priority: normal Milestone: 8.0.0d
Component: sge Version: 6.2u5
Severity: minor Keywords: Linux execution patch
Cc:

Description

[Imported from gridengine issuezilla http://gridengine.sunsource.net/issues/show_bug.cgi?id=3239]

        Issue #:      3239             Platform:     Other    Reporter: macona (macona)
       Component:     gridengine          OS:        Linux
     Subcomponent:    execution        Version:      6.2u5       CC:    None defined
        Status:       NEW              Priority:     P3
      Resolution:                     Issue type:    DEFECT
                                   Target milestone: ---
      Assigned to:    rayson (rayson)
      QA Contact:     pollinger
          URL:
       * Summary:     -terse option in sge_request files is ignored
   Status whiteboard:
      Attachments:

     Issue 3239 blocks:
   Votes for issue 3239:


   Opened: Fri Feb 12 15:53:00 -0700 2010 
------------------------


The "-terse" qsub option, when specified in an sge_request file, is ignored. However, when given on the command line, -terse works as expected.

GE6.2u5

$ cat .sge_request
-terse
-V
-p 0
-cwd

$ qsub /usr/local/sge/examples/jobs/simple.sh
Your job 1669994 ("simple.sh") has been submitted

$ qsub -terse /usr/local/sge/examples/jobs/simple.sh
1669995

   ------- Additional comments from rayson Fri Feb 12 18:52:51 -0700 2010 -------
The problem is in clients/qsub/qsub.c :

Currently, the check is done on the command line options only:

   /*
    * Check if -terse is requested
    */
   if (opt_list_has_X(opts_cmdline, "-terse")) {
      has_terse = true;
   }

A similar check should be done on opts_defaults, which holds options from the default files. Or, if needed, do the check after the merge of
all the options:

   /*
    * Merge all commandline options and interprete them
    */
   opt_list_merge_command_lines(&opts_all, &opts_defaults,
                                &opts_scriptfile, &opts_cmdline);

   if (opt_list_has_X(opts_all, "-terse")) {      /* possible fix for 3239 */
      has_terse = true;
   }

   ------- Additional comments from rayson Fri Feb 12 19:04:23 -0700 2010 -------
The fix is to check all the option lists, not just the options from the command line:

hccgalaxy:/tmp/s/source> cvs diff -C4 clients/qsub/qsub.c
Index: clients/qsub/qsub.c
===================================================================
RCS file: /cvs/gridengine/source/clients/qsub/qsub.c,v
retrieving revision 1.71
diff -C 4 -r1.71 qsub.c
*** clients/qsub/qsub.c 23 Jul 2009 10:06:23 -0000      1.71
--- clients/qsub/qsub.c 13 Feb 2010 02:03:05 -0000
***************
*** 168,182 ****
        SGE_EXIT((void**)&ctx, 0);
     }

     /*
-     * Check if -terse is requested
-     */
-    if (opt_list_has_X(opts_cmdline, "-terse")) {
-       has_terse = true;
-    }
-
-    /*
      * We will only read commandline options from scripfile if the script
      * itself should not be handled as binary
      */
     if (opt_list_is_X_true(opts_cmdline, "-b") ||
--- 168,175 ----
***************
*** 200,207 ****
--- 193,207 ----
      */
     opt_list_merge_command_lines(&opts_all, &opts_defaults,
                                  &opts_scriptfile, &opts_cmdline);

+    /*
+     * Check if -terse is requested
+     */
+    if (opt_list_has_X(opts_all, "-terse")) {
+       has_terse = true;
+    }
+
     /* If "-sync y" is set, wait for the job to end. */
     /* Remove all -sync switches since cull_parse_job_parameter()
      * doesn't know what to do with them. */
     while ((ep = lGetElemStr(opts_all, SPA_switch, "-sync"))) {

Change History (4)

comment:1 Changed 7 years ago by dlove

  • Keywords patch added; removed
  • Milestone set to 8.0.0d
  • Severity set to minor

comment:2 Changed 7 years ago by Dave Love <d.love@…>

  • Owner set to Dave Love <d.love@…>
  • Resolution set to fixed
  • Status changed from new to closed

In [4079/sge]:

(The changeset message doesn't reference this ticket)

comment:3 Changed 7 years ago by dlove

  • Resolution fixed deleted
  • Status changed from closed to reopened

From baf035:

a change in the changeset 4079 fix an issue "-terse" in sge_request file
is ignored but when you use "qsub -terse ..." directly and no sge_request
file is set you receive a full output. ( Your job 120477 ("sleep") has
been submitted ).

comment:4 Changed 7 years ago by Dave Love <d.love@…>

  • Resolution set to fixed
  • Status changed from reopened to closed

In [4137/sge]:

(The changeset message doesn't reference this ticket)

Note: See TracTickets for help on using tickets.