Skip to content
Snippets Groups Projects
Commit 6ec72513 authored by Dominik Bartkiewicz's avatar Dominik Bartkiewicz Committed by Alejandro Sanchez
Browse files

Fix alloc_node validation when updating a job.

Bug 8047
parent 13bf677d
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ documents those changes that are of interest to users and administrators.
-- Fix --ntasks-per-node in cons_tres.
-- Fix array tasks getting same reject reason.
-- Ignore DOWN/DRAIN partitions in reduce_completing_frag logic.
-- Fix alloc_node validation when updating a job.
 
* Changes in Slurm 19.05.4
==========================
......
......@@ -72,6 +72,7 @@
#include "src/common/parse_time.h"
#include "src/common/power.h"
#include "src/common/slurm_accounting_storage.h"
#include "src/common/slurm_auth.h"
#include "src/common/slurm_jobcomp.h"
#include "src/common/slurm_mcs.h"
#include "src/common/slurm_priority.h"
......@@ -13896,12 +13897,18 @@ fini:
extern int update_job(slurm_msg_t *msg, uid_t uid, bool send_msg)
{
job_desc_msg_t *job_specs = (job_desc_msg_t *) msg->data;
char *hostname = g_slurm_auth_get_host(msg->auth_cred);
struct job_record *job_ptr;
int rc;
 
xfree(job_specs->job_id_str);
xstrfmtcat(job_specs->job_id_str, "%u", job_specs->job_id);
 
if (hostname) {
xfree(job_specs->alloc_node);
job_specs->alloc_node = hostname;
}
job_ptr = find_job_record(job_specs->job_id);
if (job_ptr == NULL) {
info("%s: JobId=%u does not exist",
......@@ -13930,6 +13937,7 @@ extern int update_job_str(slurm_msg_t *msg, uid_t uid)
 
slurm_msg_t resp_msg;
job_desc_msg_t *job_specs = (job_desc_msg_t *) msg->data;
char *hostname = g_slurm_auth_get_host(msg->auth_cred);
struct job_record *job_ptr, *new_job_ptr, *pack_job;
ListIterator iter;
long int long_id;
......@@ -13946,6 +13954,12 @@ extern int update_job_str(slurm_msg_t *msg, uid_t uid)
 
job_id_str = job_specs->job_id_str;
 
if (hostname) {
xfree(job_specs->alloc_node);
job_specs->alloc_node = hostname;
}
if (max_array_size == NO_VAL)
max_array_size = slurmctld_conf.max_array_sz;
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment