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
e69cc078
Commit
e69cc078
authored
16 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Add retry logic to socket connect() call from client which can fail
when the slurmctld is under heavy load.
parent
8a315acf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
NEWS
+2
-0
2 additions, 0 deletions
NEWS
src/common/slurm_protocol_api.c
+29
-18
29 additions, 18 deletions
src/common/slurm_protocol_api.c
with
31 additions
and
18 deletions
NEWS
+
2
−
0
View file @
e69cc078
...
@@ -6,6 +6,8 @@ documents those changes that are of interest to users and admins.
...
@@ -6,6 +6,8 @@ documents those changes that are of interest to users and admins.
-- Some updates to man page formatting from Gennaro Oliva, ICAR.
-- Some updates to man page formatting from Gennaro Oliva, ICAR.
-- Smarter loading of plugins (doesn't stat every file in the plugin dir)
-- Smarter loading of plugins (doesn't stat every file in the plugin dir)
-- In sched/backfill avoid trying to schedule jobs on DOWN or DRAINED nodes.
-- In sched/backfill avoid trying to schedule jobs on DOWN or DRAINED nodes.
-- Add retry logic to socket connect() call from client which can fail
when the slurmctld is under heavy load.
* Changes in SLURM 1.3.3
* Changes in SLURM 1.3.3
========================
========================
...
...
This diff is collapsed.
Click to expand it.
src/common/slurm_protocol_api.c
+
29
−
18
View file @
e69cc078
...
@@ -1173,8 +1173,9 @@ slurm_fd slurm_open_msg_conn(slurm_addr * slurm_address)
...
@@ -1173,8 +1173,9 @@ slurm_fd slurm_open_msg_conn(slurm_addr * slurm_address)
return
_slurm_open_msg_conn
(
slurm_address
);
return
_slurm_open_msg_conn
(
slurm_address
);
}
}
/* calls connect to make a connection-less datagram connection to the
/* Calls connect to make a connection-less datagram connection to the
* primary or secondary slurmctld message engine
* primary or secondary slurmctld message engine. If the controller
* is very busy the connect may fail, so retry a couple of times.
* OUT addr - address of controller contacted
* OUT addr - address of controller contacted
* RET slurm_fd - file descriptor of the connection created
* RET slurm_fd - file descriptor of the connection created
*/
*/
...
@@ -1182,29 +1183,39 @@ slurm_fd slurm_open_controller_conn(slurm_addr *addr)
...
@@ -1182,29 +1183,39 @@ slurm_fd slurm_open_controller_conn(slurm_addr *addr)
{
{
slurm_fd
fd
;
slurm_fd
fd
;
slurm_ctl_conf_t
*
conf
;
slurm_ctl_conf_t
*
conf
;
int
retry
,
have_backup
=
0
;
if
(
slurm_api_set_default_config
()
<
0
)
if
(
slurm_api_set_default_config
()
<
0
)
return
SLURM_FAILURE
;
return
SLURM_FAILURE
;
addr
=
&
proto_conf
->
primary_controller
;
if
((
fd
=
slurm_open_msg_conn
(
&
proto_conf
->
primary_controller
))
>=
0
)
return
fd
;
debug
(
"Failed to contact primary controller: %m"
);
conf
=
slurm_conf_lock
();
for
(
retry
=
0
;
retry
<
2
;
retry
++
)
{
if
(
!
conf
->
backup_controller
)
{
if
(
retry
)
slurm_conf_unlock
();
sleep
(
1
);
goto
fail
;
addr
=
&
proto_conf
->
primary_controller
;
fd
=
slurm_open_msg_conn
(
&
proto_conf
->
primary_controller
);
if
(
fd
>=
0
)
return
fd
;
debug
(
"Failed to contact primary controller: %m"
);
if
(
retry
==
0
)
{
conf
=
slurm_conf_lock
();
if
(
conf
->
backup_controller
)
have_backup
=
1
;
slurm_conf_unlock
();
}
if
(
have_backup
)
{
addr
=
&
proto_conf
->
secondary_controller
;
fd
=
slurm_open_msg_conn
(
&
proto_conf
->
secondary_controller
);
if
(
fd
>=
0
)
return
fd
;
debug
(
"Failed to contact secondary controller: %m"
);
}
}
}
slurm_conf_unlock
();
addr
=
&
proto_conf
->
secondary_controller
;
if
((
fd
=
slurm_open_msg_conn
(
&
proto_conf
->
secondary_controller
))
>=
0
)
return
fd
;
addr
=
NULL
;
addr
=
NULL
;
debug
(
"Failed to contact secondary controller: %m"
);
fail:
slurm_seterrno_ret
(
SLURMCTLD_COMMUNICATIONS_CONNECTION_ERROR
);
slurm_seterrno_ret
(
SLURMCTLD_COMMUNICATIONS_CONNECTION_ERROR
);
}
}
...
...
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