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
5ee833e2
"README.rst" did not exist on "ea6dbb187d6e40e74656192b60bfc67d04430aff"
Commit
5ee833e2
authored
22 years ago
by
jce
Browse files
Options
Downloads
Patches
Plain Diff
Fixed bug with commandline parsing of for control_machine backup_machine
parent
21c38600
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/slurmctld/controller.c
+0
-2
0 additions, 2 deletions
src/slurmctld/controller.c
src/slurmctld/read_config.c
+21
-16
21 additions, 16 deletions
src/slurmctld/read_config.c
with
21 additions
and
18 deletions
src/slurmctld/controller.c
+
0
−
2
View file @
5ee833e2
...
@@ -680,9 +680,7 @@ fill_ctld_conf ( slurm_ctl_conf_t * conf_ptr )
...
@@ -680,9 +680,7 @@ fill_ctld_conf ( slurm_ctl_conf_t * conf_ptr )
conf_ptr
->
last_update
=
init_time
;
conf_ptr
->
last_update
=
init_time
;
if
(
!
conf_ptr
->
backup_interval
)
conf_ptr
->
backup_interval
=
BACKUP_INTERVAL
;
if
(
!
conf_ptr
->
backup_interval
)
conf_ptr
->
backup_interval
=
BACKUP_INTERVAL
;
if
(
!
conf_ptr
->
backup_location
)
conf_ptr
->
backup_location
=
BACKUP_LOCATION
;
if
(
!
conf_ptr
->
backup_location
)
conf_ptr
->
backup_location
=
BACKUP_LOCATION
;
if
(
!
conf_ptr
->
backup_machine
)
conf_ptr
->
backup_machine
=
backup_controller
;
if
(
!
conf_ptr
->
control_daemon
)
conf_ptr
->
control_daemon
=
CONTROL_DAEMON
;
if
(
!
conf_ptr
->
control_daemon
)
conf_ptr
->
control_daemon
=
CONTROL_DAEMON
;
if
(
!
conf_ptr
->
control_machine
)
conf_ptr
->
control_machine
=
control_machine
;
if
(
!
conf_ptr
->
controller_timeout
)
conf_ptr
->
controller_timeout
=
CONTROLLER_TIMEOUT
;
if
(
!
conf_ptr
->
controller_timeout
)
conf_ptr
->
controller_timeout
=
CONTROLLER_TIMEOUT
;
if
(
!
conf_ptr
->
epilog
)
conf_ptr
->
epilog
=
EPILOG
;
if
(
!
conf_ptr
->
epilog
)
conf_ptr
->
epilog
=
EPILOG
;
if
(
!
conf_ptr
->
fast_schedule
)
conf_ptr
->
fast_schedule
=
FAST_SCHEDULE
;
if
(
!
conf_ptr
->
fast_schedule
)
conf_ptr
->
fast_schedule
=
FAST_SCHEDULE
;
...
...
This diff is collapsed.
Click to expand it.
src/slurmctld/read_config.c
+
21
−
16
View file @
5ee833e2
...
@@ -28,10 +28,14 @@
...
@@ -28,10 +28,14 @@
int
parse_node_spec
(
char
*
in_line
);
int
parse_node_spec
(
char
*
in_line
);
int
parse_part_spec
(
char
*
in_line
);
int
parse_part_spec
(
char
*
in_line
);
char
*
backup_controller
=
NULL
;
char
*
control_machine
=
NULL
;
int
node_record_count
=
0
;
int
node_record_count
=
0
;
#if DEBUG_MODULE
slurm_ctl_conf_t
slurmctld_conf
;
#else
extern
slurm_ctl_conf_t
slurmctld_conf
;
#endif
#if DEBUG_MODULE
#if DEBUG_MODULE
/* main is used here for module testing purposes only */
/* main is used here for module testing purposes only */
#include
<sys/resource.h>
#include
<sys/resource.h>
...
@@ -67,8 +71,8 @@ main (int argc, char *argv[]) {
...
@@ -67,8 +71,8 @@ main (int argc, char *argv[]) {
exit
(
error_code
);
exit
(
error_code
);
}
}
printf
(
"ControlMachine=%s
\n
"
,
control_machine
);
printf
(
"ControlMachine=%s
\n
"
,
slurmctld_conf
.
control_machine
);
printf
(
"BackupController=%s
\n
"
,
backup_controller
);
printf
(
"BackupController=%s
\n
"
,
bslurmctld_conf
.
backup_controller
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
for
(
i
=
0
;
i
<
node_record_count
;
i
++
)
{
for
(
i
=
0
;
i
<
node_record_count
;
i
++
)
{
...
@@ -328,15 +332,6 @@ int
...
@@ -328,15 +332,6 @@ int
init_slurm_conf
()
{
init_slurm_conf
()
{
int
error_code
;
int
error_code
;
if
(
control_machine
)
{
xfree
(
control_machine
);
control_machine
=
NULL
;
}
if
(
backup_controller
)
{
xfree
(
backup_controller
);
backup_controller
=
NULL
;
}
if
((
error_code
=
init_node_conf
()))
if
((
error_code
=
init_node_conf
()))
return
error_code
;
return
error_code
;
...
@@ -707,6 +702,9 @@ read_slurm_conf (char *file_name) {
...
@@ -707,6 +702,9 @@ read_slurm_conf (char *file_name) {
/* process the data file */
/* process the data file */
line_num
=
0
;
line_num
=
0
;
while
(
fgets
(
in_line
,
BUF_SIZE
,
slurm_spec_file
)
!=
NULL
)
{
while
(
fgets
(
in_line
,
BUF_SIZE
,
slurm_spec_file
)
!=
NULL
)
{
char
*
control_machine
=
NULL
;
char
*
backup_machine
=
NULL
;
line_num
++
;
line_num
++
;
if
(
strlen
(
in_line
)
>=
(
BUF_SIZE
-
1
))
{
if
(
strlen
(
in_line
)
>=
(
BUF_SIZE
-
1
))
{
error
(
"read_slurm_conf line %d, of input file %s too long
\n
"
,
error
(
"read_slurm_conf line %d, of input file %s too long
\n
"
,
...
@@ -737,13 +735,20 @@ read_slurm_conf (char *file_name) {
...
@@ -737,13 +735,20 @@ read_slurm_conf (char *file_name) {
/* overall slurm configuration parameters */
/* overall slurm configuration parameters */
error_code
=
slurm_parser
(
in_line
,
error_code
=
slurm_parser
(
in_line
,
"ControlMachine="
,
's'
,
&
control_machine
,
"ControlMachine="
,
's'
,
&
control_machine
,
"BackupController="
,
's'
,
&
backup_
controller
,
"BackupController="
,
's'
,
&
backup_
machine
,
"END"
);
"END"
);
if
(
error_code
)
{
if
(
error_code
)
{
fclose
(
slurm_spec_file
);
fclose
(
slurm_spec_file
);
return
error_code
;
return
error_code
;
}
}
if
(
slurmctld_conf
.
control_machine
==
NULL
)
{
slurmctld_conf
.
control_machine
=
control_machine
;
}
if
(
slurmctld_conf
.
backup_machine
==
NULL
)
{
slurmctld_conf
.
backup_machine
=
backup_machine
;
}
/* node configuration parameters */
/* node configuration parameters */
if
((
error_code
=
parse_node_spec
(
in_line
)))
{
if
((
error_code
=
parse_node_spec
(
in_line
)))
{
fclose
(
slurm_spec_file
);
fclose
(
slurm_spec_file
);
...
@@ -762,10 +767,10 @@ read_slurm_conf (char *file_name) {
...
@@ -762,10 +767,10 @@ read_slurm_conf (char *file_name) {
fclose
(
slurm_spec_file
);
fclose
(
slurm_spec_file
);
/* if values not set in configuration file, set defaults */
/* if values not set in configuration file, set defaults */
if
(
backup_controller
==
NULL
)
if
(
slurmctld_conf
.
backup_machine
==
NULL
)
info
(
"read_slurm_conf: backup_controller value not specified."
);
info
(
"read_slurm_conf: backup_controller value not specified."
);
if
(
control_machine
==
NULL
)
{
if
(
slurmctld_conf
.
control_machine
==
NULL
)
{
error
(
"read_slurm_conf: control_machine value not specified."
);
error
(
"read_slurm_conf: control_machine value not specified."
);
return
EINVAL
;
return
EINVAL
;
}
}
...
...
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