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
43eca6dd
Commit
43eca6dd
authored
21 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Make SlurmdSpoolDir as needed rather than just aborting.
parent
1b57c956
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/slurmd/slurmd.c
+12
-4
12 additions, 4 deletions
src/slurmd/slurmd.c
with
12 additions
and
4 deletions
src/slurmd/slurmd.c
+
12
−
4
View file @
43eca6dd
...
@@ -104,7 +104,7 @@ static void _print_conf();
...
@@ -104,7 +104,7 @@ static void _print_conf();
static
void
_read_config
();
static
void
_read_config
();
static
void
_kill_old_slurmd
();
static
void
_kill_old_slurmd
();
static
void
_reconfigure
();
static
void
_reconfigure
();
static
void
_restore_cred_state
(
slurm_cred_ctx_t
ctx
);
static
int
_restore_cred_state
(
slurm_cred_ctx_t
ctx
);
static
void
_increment_thd_count
();
static
void
_increment_thd_count
();
static
void
_decrement_thd_count
();
static
void
_decrement_thd_count
();
static
void
_wait_for_all_threads
();
static
void
_wait_for_all_threads
();
...
@@ -593,7 +593,8 @@ _slurmd_init()
...
@@ -593,7 +593,8 @@ _slurmd_init()
/*
/*
* Restore any saved revoked credential information
* Restore any saved revoked credential information
*/
*/
_restore_cred_state
(
conf
->
vctx
);
if
(
_restore_cred_state
(
conf
->
vctx
))
return
SLURM_FAILURE
;
/*
/*
* Cleanup shared memory if so configured
* Cleanup shared memory if so configured
...
@@ -624,14 +625,20 @@ _slurmd_init()
...
@@ -624,14 +625,20 @@ _slurmd_init()
return
SLURM_SUCCESS
;
return
SLURM_SUCCESS
;
}
}
static
void
static
int
_restore_cred_state
(
slurm_cred_ctx_t
ctx
)
_restore_cred_state
(
slurm_cred_ctx_t
ctx
)
{
{
char
*
file_name
,
*
data
=
NULL
;
char
*
file_name
=
NULL
,
*
data
=
NULL
;
uint32_t
data_size
=
0
;
uint32_t
data_size
=
0
;
int
cred_fd
,
data_allocated
,
data_read
=
0
;
int
cred_fd
,
data_allocated
,
data_read
=
0
;
Buf
buffer
=
NULL
;
Buf
buffer
=
NULL
;
if
((
mkdir
(
conf
->
spooldir
,
0755
)
<
0
)
&&
(
errno
!=
EEXIST
))
{
error
(
"mkdir(%s): %m"
,
conf
->
spooldir
);
return
SLURM_ERROR
;
}
file_name
=
xstrdup
(
conf
->
spooldir
);
file_name
=
xstrdup
(
conf
->
spooldir
);
xstrcat
(
file_name
,
"/cred_state"
);
xstrcat
(
file_name
,
"/cred_state"
);
cred_fd
=
open
(
file_name
,
O_RDONLY
);
cred_fd
=
open
(
file_name
,
O_RDONLY
);
...
@@ -655,6 +662,7 @@ _restore_cred_state(slurm_cred_ctx_t ctx)
...
@@ -655,6 +662,7 @@ _restore_cred_state(slurm_cred_ctx_t ctx)
xfree
(
file_name
);
xfree
(
file_name
);
if
(
buffer
)
if
(
buffer
)
free_buf
(
buffer
);
free_buf
(
buffer
);
return
SLURM_SUCCESS
;
}
}
static
int
static
int
...
...
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