Hello all,
we seem to be hitting a problem when associating a reservation with an account
name containing a “-“ .
(1) We create two reservations, one allowing access to the account scitest and
the other to scitas-ge
$ scontrol show reservation
ReservationName=scitest_13 StartTime=2015-02-27T10:15:00
EndTime=2015-02-27T11:15:00 Duration=01:00:00
Nodes=b292 NodeCnt=1 CoreCnt=16 Features=(null) PartitionName=debug Flags=
Users=(null) Accounts=scitest Licenses=(null) State=ACTIVE
ReservationName=scitas-ge_14 StartTime=2015-02-27T10:31:14
EndTime=2015-02-27T11:31:14 Duration=01:00:00
Nodes=b291 NodeCnt=1 CoreCnt=16 Features=(null) PartitionName=debug Flags=
Users=(null) Accounts=scitas-ge Licenses=(null) State=ACTIVE
(2) A user who is a member of both accounts then tries to use the reservations
$ srun --reservation=scitest_13 --partition=debug --account=scitest -N 1 -n 1
hostname
b292
So that works as expected. If we try using the “scitas-ge” account we see
$ srun --reservation=scitas-ge_14 --partition=debug --account=scitas-ge -N 1 -n
1 hostname
srun: error: Unable to allocate resources: Access denied to requested
reservation
In this case in the slurmtctld log we see
[2015-02-27T10:34:18.376] debug2: Processing RPC: REQUEST_RESERVATION_INFO from
uid=141633
[2015-02-27T10:34:19.873] debug2: sched: Processing RPC:
REQUEST_RESOURCE_ALLOCATION from uid=141633
[2015-02-27T10:34:19.873] debug3: JobDesc: user_id=141633 job_id=N/A
partition=debug name=hostname
[2015-02-27T10:34:19.873] debug3: cpus=1-4294967294 pn_min_cpus=-1
core_spec=-1
[2015-02-27T10:34:19.873] debug3: -N min-[max]: 1-[1]:65534:65534:65534
[2015-02-27T10:34:19.873] debug3: pn_min_memory_job=-1 pn_min_tmp_disk=-1
[2015-02-27T10:34:19.873] debug3: immediate=0 features=(null)
reservation=scitas-ge_14
[2015-02-27T10:34:19.873] debug3: req_nodes=(null) exc_nodes=(null)
gres=(null)
[2015-02-27T10:34:19.873] debug3: time_limit=-1--1 priority=-1 contiguous=0
shared=-1
[2015-02-27T10:34:19.873] debug3: kill_on_node_fail=-1 script=(null)
[2015-02-27T10:34:19.873] debug3: argv="hostname"
[2015-02-27T10:34:19.873] debug3: stdin=(null) stdout=(null) stderr=(null)
[2015-02-27T10:34:19.873] debug3: work_dir=/home/eroche
alloc_node:sid=badmin:21091
[2015-02-27T10:34:19.873] debug3: resp_host=172.30.100.2
alloc_resp_port=56412 other_port=57566
[2015-02-27T10:34:19.873] debug3: dependency=(null) account=scitas-ge
qos=(null) comment=(null)
[2015-02-27T10:34:19.873] debug3: mail_type=0 mail_user=(null) nice=0
num_tasks=1 open_mode=0 overcommit=-1 acctg_freq=(null)
[2015-02-27T10:34:19.873] debug3: network=(null) begin=Unknown
cpus_per_task=-1 requeue=-1 licenses=(null)
[2015-02-27T10:34:19.873] debug3: end_time=Unknown signal=0@0
wait_all_nodes=-1
[2015-02-27T10:34:19.873] debug3: ntasks_per_node=-1 ntasks_per_socket=-1
ntasks_per_core=-1
[2015-02-27T10:34:19.873] debug3: mem_bind=65534:(null) plane_size:65534
[2015-02-27T10:34:19.873] debug3: array_inx=(null)
[2015-02-27T10:34:19.873] debug3: found correct association
[2015-02-27T10:34:19.873] debug3: found correct qos
[2015-02-27T10:34:19.873] debug3: acct_policy_validate: MPN: job_memory set to
32000
[2015-02-27T10:34:19.873] debug3: before alteration asking for nodes 1-1 cpus
1-4294967294
[2015-02-27T10:34:19.873] debug3: after alteration asking for nodes 1-1 cpus
1-4294967294
[2015-02-27T10:34:19.873] Security violation, uid=141633 account=scitas-ge
attempt to use reservation scitas-ge_14
[2015-02-27T10:34:19.873] _slurm_rpc_allocate_resources: Access denied to
requested reservation
What seems to be happening is that in slurmctld/reservation.c the “-“ is being
picked up as a sign to blacklist the account
3776 /* Check to see if the association is here or the parent
3777 * association is listed in the valid associations. */
3778 if (strchr(resv_ptr->assoc_list, '-')) {
3779 assoc = job_ptr->assoc_ptr;
3780 while (assoc) {
3781 snprintf(tmp_char, sizeof(tmp_char),
",-%u,",
3782 assoc->id);
3783 if (strstr(resv_ptr->assoc_list, tmp_char))
3784 goto end_it; /* explicitly
denied */
3785 assoc = assoc->usage->parent_assoc_ptr;
3786 }
3787 }
Can anybody shed some light on this and confirm that our suspicion regarding
the presence of the hyphen is correct?
Thanks
Ewan Roche
SCITAS
Ecole Polytechnique Fédérale de Lausanne (EPFL)