|
Lines 8473-8494
static int _list_find_job_old(void *job_entry, void *key)
Link Here
|
| 8473 |
job_ptr->time_last_active = now; |
8473 |
job_ptr->time_last_active = now; |
| 8474 |
re_kill_job(job_ptr); |
8474 |
re_kill_job(job_ptr); |
| 8475 |
} |
8475 |
} |
|
|
8476 |
info("job %u not purged, job still completing", job_ptr->job_id); |
| 8476 |
return 0; /* Job still completing */ |
8477 |
return 0; /* Job still completing */ |
| 8477 |
} |
8478 |
} |
| 8478 |
|
8479 |
|
| 8479 |
if (job_ptr->epilog_running) |
8480 |
if (job_ptr->epilog_running) { |
|
|
8481 |
info("job %u not purged, EpilogSlurmctld still running", job_ptr->job_id); |
| 8480 |
return 0; /* EpilogSlurmctld still running */ |
8482 |
return 0; /* EpilogSlurmctld still running */ |
|
|
8483 |
} |
| 8481 |
|
8484 |
|
| 8482 |
if (slurmctld_conf.min_job_age == 0) |
8485 |
if (slurmctld_conf.min_job_age == 0) { |
|
|
8486 |
info("job %u not purged, no job record purging", job_ptr->job_id); |
| 8483 |
return 0; /* No job record purging */ |
8487 |
return 0; /* No job record purging */ |
|
|
8488 |
} |
| 8484 |
|
8489 |
|
| 8485 |
min_age = now - slurmctld_conf.min_job_age; |
8490 |
min_age = now - slurmctld_conf.min_job_age; |
| 8486 |
if (fed_mgr_is_origin_job(job_ptr) && |
8491 |
if (fed_mgr_is_origin_job(job_ptr) && |
| 8487 |
(job_ptr->end_time > min_age)) |
8492 |
(job_ptr->end_time > min_age)) { |
|
|
8493 |
info("job %u not purged, too new to purge", job_ptr->job_id); |
| 8488 |
return 0; /* Too new to purge */ |
8494 |
return 0; /* Too new to purge */ |
|
|
8495 |
} |
| 8489 |
|
8496 |
|
| 8490 |
if (!(IS_JOB_COMPLETED(job_ptr))) |
8497 |
if (!(IS_JOB_COMPLETED(job_ptr))) { |
|
|
8498 |
info("job %u not purged, job hasn't finished yet", job_ptr->job_id); |
| 8491 |
return 0; /* Job still active */ |
8499 |
return 0; /* Job still active */ |
|
|
8500 |
} |
| 8492 |
|
8501 |
|
| 8493 |
if (job_ptr->step_list && list_count(job_ptr->step_list)) { |
8502 |
if (job_ptr->step_list && list_count(job_ptr->step_list)) { |
| 8494 |
debug("Job %u still has %d active steps", |
8503 |
debug("Job %u still has %d active steps", |
|
Lines 8500-8505
static int _list_find_job_old(void *job_entry, void *key)
Link Here
|
| 8500 |
if (job_ptr->array_recs->tot_run_tasks || |
8509 |
if (job_ptr->array_recs->tot_run_tasks || |
| 8501 |
!test_job_array_completed(job_ptr->array_job_id)) { |
8510 |
!test_job_array_completed(job_ptr->array_job_id)) { |
| 8502 |
/* Some tasks from this job array still active */ |
8511 |
/* Some tasks from this job array still active */ |
|
|
8512 |
info("job %u not purged, Some tasks from this job array still active", |
| 8513 |
job_ptr->job_id); |
| 8503 |
return 0; |
8514 |
return 0; |
| 8504 |
} |
8515 |
} |
| 8505 |
} |
8516 |
} |
|
Lines 8507-8517
static int _list_find_job_old(void *job_entry, void *key)
Link Here
|
| 8507 |
select_g_select_jobinfo_get(job_ptr->select_jobinfo, |
8518 |
select_g_select_jobinfo_get(job_ptr->select_jobinfo, |
| 8508 |
SELECT_JOBDATA_CLEANING, |
8519 |
SELECT_JOBDATA_CLEANING, |
| 8509 |
&cleaning); |
8520 |
&cleaning); |
| 8510 |
if (cleaning) |
8521 |
if (cleaning) { |
|
|
8522 |
info("job %u not purged, job hasn't finished yet", job_ptr->job_id); |
| 8511 |
return 0; /* Job hasn't finished yet */ |
8523 |
return 0; /* Job hasn't finished yet */ |
|
|
8524 |
} |
| 8512 |
|
8525 |
|
| 8513 |
if (bb_g_job_test_stage_out(job_ptr) != 1) |
8526 |
if (bb_g_job_test_stage_out(job_ptr) != 1) { |
|
|
8527 |
info("job %u not purged, stage out in progress", job_ptr->job_id); |
| 8514 |
return 0; /* Stage out in progress */ |
8528 |
return 0; /* Stage out in progress */ |
|
|
8529 |
} |
| 8515 |
|
8530 |
|
| 8516 |
/* If we don't have a db_index by now and we are running with |
8531 |
/* If we don't have a db_index by now and we are running with |
| 8517 |
* the slurmdbd, lets put it on the list to be handled later |
8532 |
* the slurmdbd, lets put it on the list to be handled later |
|
Lines 8521-8526
static int _list_find_job_old(void *job_entry, void *key)
Link Here
|
| 8521 |
if (with_slurmdbd && !job_ptr->db_index) |
8536 |
if (with_slurmdbd && !job_ptr->db_index) |
| 8522 |
jobacct_storage_g_job_start(acct_db_conn, job_ptr); |
8537 |
jobacct_storage_g_job_start(acct_db_conn, job_ptr); |
| 8523 |
|
8538 |
|
|
|
8539 |
info("purging job %u", job_ptr->job_id); |
| 8524 |
return 1; /* Purge the job */ |
8540 |
return 1; /* Purge the job */ |
| 8525 |
} |
8541 |
} |
| 8526 |
|
8542 |
|