~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to source/daemons/qmaster/reschedule.c

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-11-27 23:17:37 UTC
  • Revision ID: james.westby@ubuntu.com-20081127231737-v1mrvbkmz1ttn4km
Tags: 6.2-3
* Fix the default configuration file to use full path names.
  Closes: #501972, #497855.
* Make gridengine-exec Depend: on c-shell | tcsh.  Closes: #497839.
* Add symlink farm to /var/lib/gridengine to allow for programs
  which rely on $SGE_ROOT/bin and $SGE_ROOT/utilbin.  Closes: #502000.
* Apply JG-2008-11-10-0 from upstream in order to fix a qmaster
  deadlock.
* Move qrsh_starter to gridengine-exec instead of gridengine-master.
  Closes: #501976.
* Remove linux32 from Build-Depends as it's now in util-linux.
* Ensure we don't fail in gridengine-common postinst when the sgeadmin user
  already exists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
   reschedule_jobs(ctx, hep, 0, &answer_list, monitor);
189
189
   lFreeList(&answer_list);
190
190
   
191
 
   free((char*)hostname);
192
 
   
193
 
   SGE_UNLOCK(LOCK_GLOBAL, LOCK_WRITE);
194
 
   DEXIT;
195
 
   return;
196
 
 
197
191
Error:
198
 
   free((char*)hostname);
 
192
   free(hostname);
199
193
   
200
194
   SGE_UNLOCK(LOCK_GLOBAL, LOCK_WRITE);
201
 
   DEXIT;
202
 
   return;
 
195
   DRETURN_VOID;
203
196
}
204
197
 
205
198
/****** qmaster/reschedule/reschedule_jobs() **********************************
522
515
      if (!found) {
523
516
         add_to_reschedule_unknown_list(ctx, host, job_number, task_number, 0);
524
517
         ret = 0;                
525
 
 
526
 
#if 0
527
 
         DPRINTF(("RU: ADDED JOB "sge_u32"."sge_u32
528
 
            " ON HOST "SFN" TO RU_TYPE-LIST\n", job_number,
529
 
            task_number, hostname));
530
 
      } else {
531
 
         DPRINTF(("RU: JOB "sge_u32"."sge_u32" ON HOST "SFN
532
 
            " already contained in RU_TYPE-LIST\n", job_number,
533
 
            task_number, hostname));
534
 
#endif
535
518
      }
536
519
 
537
520
      /*
538
 
       * Trigger the rescheduling of this task
539
 
       */
540
 
      if (!found) {
541
 
         lListElem *pseudo_jr; /* JR_Type */
542
 
 
543
 
         lSetUlong(this_jatep, JAT_job_restarted, 1);
544
 
 
545
 
         pseudo_jr = lCreateElem(JR_Type);
546
 
         lSetUlong(pseudo_jr, JR_job_number, job_number);
547
 
         lSetUlong(pseudo_jr, JR_ja_task_number, task_number);
548
 
         lSetUlong(pseudo_jr, JR_failed, SSTATE_AGAIN);
549
 
         lSetString(pseudo_jr, JR_err_str, (char *) MSG_RU_JR_ERRSTR);
550
 
         lSetString(pseudo_jr, JR_queue_name,
551
 
                    lGetString(first_granted_queue, JG_qname));
552
 
         sge_job_exit(ctx, pseudo_jr, jep, this_jatep, monitor);
553
 
         lFreeElem(&pseudo_jr);
554
 
      }                         
555
 
 
556
 
      /*
557
521
       * Mails and messages
558
522
       */
559
523
      if (!found) {
584
548
         answer_list_add(answer, SGE_EVENT, 
585
549
                         STATUS_ESEMANTIC, ANSWER_QUALITY_WARNING);
586
550
      }
587
 
   }
588
 
   DEXIT;
589
 
   return ret;
 
551
 
 
552
      /*
 
553
       * Trigger the rescheduling of this task
 
554
       */
 
555
      if (!found) {
 
556
         lListElem *pseudo_jr; /* JR_Type */
 
557
 
 
558
         lSetUlong(this_jatep, JAT_job_restarted, 1);
 
559
 
 
560
         pseudo_jr = lCreateElem(JR_Type);
 
561
         lSetUlong(pseudo_jr, JR_job_number, job_number);
 
562
         lSetUlong(pseudo_jr, JR_ja_task_number, task_number);
 
563
         lSetUlong(pseudo_jr, JR_failed, SSTATE_AGAIN);
 
564
         lSetString(pseudo_jr, JR_err_str, (char *) MSG_RU_JR_ERRSTR);
 
565
         lSetString(pseudo_jr, JR_queue_name,
 
566
                    lGetString(first_granted_queue, JG_qname));
 
567
         sge_job_exit(ctx, pseudo_jr, jep, this_jatep, monitor);
 
568
         lFreeElem(&pseudo_jr);
 
569
   }
 
570
   }
 
571
 
 
572
   DRETURN(ret);
590
573
}   
591
574
 
592
575
/****** qmaster/reschedule/add_to_reschedule_unknown_list() *******************