Skip to content
Snippets Groups Projects
Commit 2c4121ee authored by Moe Jette's avatar Moe Jette
Browse files

Add new function slurm_ping().

parent 40cd4218
No related branches found
No related tags found
No related merge requests found
......@@ -832,9 +832,16 @@ extern int slurm_update_partition PARAMS(( update_part_msg_t * part_msg ));
/*****************************************************************************\
* SLURM RECONFIGURE/SHUTDOWN FUNCTIONS
* SLURM PING/RECONFIGURE/SHUTDOWN FUNCTIONS
\*****************************************************************************/
/*
* slurm_ping - issue RPC to have Slurm controller (slurmctld)
* IN controller - 1==primary controller, 2==secondary controller
* RET 0 or a slurm error code
*/
extern int slurm_ping PARAMS(( int primary ));
/*
* slurm_reconfigure - issue RPC to have Slurm controller (slurmctld)
* reload its configuration file
......
......@@ -109,6 +109,31 @@ slurm_reconfigure ( void )
return SLURM_PROTOCOL_SUCCESS ;
}
/*
* slurm_ping - issue RPC to have Slurm controller (slurmctld)
* IN controller - 1==primary controller, 2==secondary controller
* RET 0 or a slurm error code
*/
int
slurm_ping (int primary)
{
int rc ;
slurm_msg_t request_msg ;
request_msg . msg_type = REQUEST_PING ;
if (primary == 1)
rc = _send_message_controller ( PRIMARY_CONTROLLER,
&request_msg );
else if (primary == 2)
rc = _send_message_controller ( SECONDARY_CONTROLLER,
&request_msg );
else
rc = SLURM_ERROR;
return rc;
}
/*
* slurm_shutdown - issue RPC to have Slurm controller (slurmctld)
* cease operations, both the primary and backup controller
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment