Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
6591440c
Commit
6591440c
authored
10 years ago
by
Danny Auble
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/slurm-14.03' into slurm-14.11
parents
4636a339
1bef5ee8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS
+2
-0
2 additions, 0 deletions
NEWS
src/common/assoc_mgr.c
+44
-18
44 additions, 18 deletions
src/common/assoc_mgr.c
src/slurmctld/read_config.c
+10
-0
10 additions, 0 deletions
src/slurmctld/read_config.c
with
56 additions
and
18 deletions
NEWS
+
2
−
0
View file @
6591440c
...
...
@@ -393,6 +393,8 @@ documents those changes that are of interest to users and administrators.
-- Fix "squeue --start" to override SQUEUE_FORMAT env variable.
-- Restore GRES functionality with select/linear plugin. It was broken in
version 14.03.10.
-- Fix possible race condition when attempting to use QOS on a system running
accounting_storage/filetxt.
* Changes in Slurm 14.03.10
===========================
...
...
This diff is collapsed.
Click to expand it.
src/common/assoc_mgr.c
+
44
−
18
View file @
6591440c
...
...
@@ -1135,16 +1135,13 @@ static int _get_assoc_mgr_res_list(void *db_conn, int enforce)
static
int
_get_assoc_mgr_qos_list
(
void
*
db_conn
,
int
enforce
)
{
uid_t
uid
=
getuid
();
List
new_list
=
NULL
;
assoc_mgr_lock_t
locks
=
{
NO_LOCK
,
NO_LOCK
,
WRITE_LOCK
,
NO_LOCK
,
NO_LOCK
,
NO_LOCK
};
assoc_mgr_lock
(
&
locks
);
if
(
assoc_mgr_qos_list
)
list_destroy
(
assoc_mgr_qos_list
);
assoc_mgr_qos_list
=
acct_storage_g_get_qos
(
db_conn
,
uid
,
NULL
);
new_list
=
acct_storage_g_get_qos
(
db_conn
,
uid
,
NULL
);
if
(
!
assoc_mgr_qos_list
)
{
assoc_mgr_unlock
(
&
locks
);
if
(
!
new_list
)
{
if
(
enforce
&
ACCOUNTING_ENFORCE_ASSOCS
)
{
error
(
"_get_assoc_mgr_qos_list: no list was made."
);
return
SLURM_ERROR
;
...
...
@@ -1153,9 +1150,16 @@ static int _get_assoc_mgr_qos_list(void *db_conn, int enforce)
}
}
assoc_mgr_lock
(
&
locks
);
FREE_NULL_LIST
(
assoc_mgr_qos_list
);
assoc_mgr_qos_list
=
new_list
;
new_list
=
NULL
;
_post_qos_list
(
assoc_mgr_qos_list
);
assoc_mgr_unlock
(
&
locks
);
return
SLURM_SUCCESS
;
}
...
...
@@ -1843,13 +1847,21 @@ extern int assoc_mgr_fill_in_assoc(void *db_conn,
if
(
assoc_pptr
)
*
assoc_pptr
=
NULL
;
/* Call assoc_mgr_refresh_lists instead of just getting the
association list because we need qos and user lists before
the association list can be made.
*/
if
(
!
assoc_mgr_association_list
)
if
(
assoc_mgr_refresh_lists
(
db_conn
)
==
SLURM_ERROR
)
return
SLURM_ERROR
;
/* Since we might be locked we can't come in here and try to
* get the list since we would need the WRITE_LOCK to do that,
* so just return as this would only happen on a system not
* talking to the database.
*/
if
(
!
assoc_mgr_association_list
)
{
int
rc
=
SLURM_SUCCESS
;
if
(
enforce
&
ACCOUNTING_ENFORCE_QOS
)
{
error
(
"No Association list available, "
"this should never happen"
);
rc
=
SLURM_ERROR
;
}
return
rc
;
}
if
((
!
assoc_mgr_association_list
||
!
list_count
(
assoc_mgr_association_list
))
...
...
@@ -2100,14 +2112,28 @@ extern int assoc_mgr_fill_in_qos(void *db_conn, slurmdb_qos_rec_t *qos,
if
(
qos_pptr
)
*
qos_pptr
=
NULL
;
if
(
!
assoc_mgr_qos_list
)
if
(
_get_assoc_mgr_qos_list
(
db_conn
,
enforce
)
==
SLURM_ERROR
)
return
SLURM_ERROR
;
if
(
!
locked
)
assoc_mgr_lock
(
&
locks
);
if
((
!
assoc_mgr_qos_list
||
!
list_count
(
assoc_mgr_qos_list
))
&&
!
(
enforce
&
ACCOUNTING_ENFORCE_QOS
))
{
/* Since we might be locked we can't come in here and try to
* get the list since we would need the WRITE_LOCK to do that,
* so just return as this would only happen on a system not
* talking to the database.
*/
if
(
!
assoc_mgr_qos_list
)
{
int
rc
=
SLURM_SUCCESS
;
if
(
enforce
&
ACCOUNTING_ENFORCE_QOS
)
{
error
(
"No QOS list available, "
"this should never happen"
);
rc
=
SLURM_ERROR
;
}
if
(
!
locked
)
assoc_mgr_unlock
(
&
locks
);
return
rc
;
}
else
if
(
!
list_count
(
assoc_mgr_qos_list
)
&&
!
(
enforce
&
ACCOUNTING_ENFORCE_QOS
))
{
if
(
!
locked
)
assoc_mgr_unlock
(
&
locks
);
return
SLURM_SUCCESS
;
...
...
This diff is collapsed.
Click to expand it.
src/slurmctld/read_config.c
+
10
−
0
View file @
6591440c
...
...
@@ -595,6 +595,16 @@ extern void qos_list_build(char *qos, bitstr_t **qos_bits)
/* Lock here to avoid g_qos_count changing under us */
assoc_mgr_lock
(
&
locks
);
if
(
!
g_qos_count
)
{
error
(
"We have no QOS on the system Ignoring invalid "
"Allow/DenyQOS value(s) %s"
,
qos
);
assoc_mgr_unlock
(
&
locks
);
FREE_NULL_BITMAP
(
*
qos_bits
);
*
qos_bits
=
NULL
;
return
;
}
tmp_qos_bitstr
=
bit_alloc
(
g_qos_count
);
tmp_qos
=
xstrdup
(
qos
);
one_qos_name
=
strtok_r
(
tmp_qos
,
","
,
&
name_ptr
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment