~ubuntu-branches/ubuntu/precise/slurm-llnl/precise

« back to all changes in this revision

Viewing changes to src/api/reconfigure.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2011-04-08 11:21:17 UTC
  • mfrom: (3.3.16 sid)
  • Revision ID: james.westby@ubuntu.com-20110408112117-nfnyq9dtm55hqoaw
Tags: 2.2.4-1
* New upstream releases 
* Cleaning spare file and directories, not belonging to the sources
  generated by the building process and not removed by distclean.
  Added debian/clean with spare files and rm -rf inside debian/rules
  for directories.
* Added new packages libslurm-perl, libslurmdb-perl, slurm-llnl-torque
  (Closes: #575822) thanks to Julien Blache

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************\
2
2
 *  reconfigure.c - request that slurmctld shutdown or re-read the
3
3
 *                  configuration files
4
 
 *  $Id: reconfigure.c 19271 2010-01-19 21:00:56Z jette $
 
4
 *  $Id: reconfigure.c 21211 2010-09-21 21:12:41Z jette $
5
5
 *****************************************************************************
6
6
 *  Copyright (C) 2002-2007 The Regents of the University of California.
7
 
 *  Copyright (C) 2008-2009 Lawrence Livermore National Security.
 
7
 *  Copyright (C) 2008-2010 Lawrence Livermore National Security.
8
8
 *  Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
9
9
 *  Written by Morris Jette <jette1@llnl.gov> et. al.
10
10
 *  CODE-OCEC-09-009. All rights reserved.
63
63
 * RET 0 or a slurm error code
64
64
 */
65
65
int
66
 
slurm_reconfigure ( void )
 
66
slurm_reconfigure (void)
67
67
{
68
68
        int rc;
69
69
        slurm_msg_t req;
156
156
_send_message_controller (enum controller_id dest, slurm_msg_t *req)
157
157
{
158
158
        int rc = SLURM_PROTOCOL_SUCCESS;
159
 
        slurm_fd fd = -1;
 
159
        slurm_fd_t fd = -1;
160
160
        slurm_msg_t *resp_msg = NULL;
161
161
 
162
162
        /* always going to one node (primary or backup per value of "dest") */
225
225
        }
226
226
        return SLURM_PROTOCOL_SUCCESS;
227
227
}
 
228
 
 
229
/*
 
230
 * slurm_set_schedlog_level - issue RPC to set slurm scheduler log level
 
231
 * IN schedlog_level - requested scheduler log level
 
232
 * RET 0 on success, otherwise return -1 and set errno to indicate the error
 
233
 */
 
234
int
 
235
slurm_set_schedlog_level (uint32_t schedlog_level)
 
236
{
 
237
        int rc;
 
238
        slurm_msg_t req_msg;
 
239
        slurm_msg_t resp_msg;
 
240
        set_debug_level_msg_t req;
 
241
 
 
242
        slurm_msg_t_init(&req_msg);
 
243
        slurm_msg_t_init(&resp_msg);
 
244
 
 
245
        req.debug_level  = schedlog_level;
 
246
        req_msg.msg_type = REQUEST_SET_SCHEDLOG_LEVEL;
 
247
        req_msg.data     = &req;
 
248
 
 
249
        if (slurm_send_recv_controller_msg(&req_msg, &resp_msg) < 0)
 
250
                return SLURM_ERROR;
 
251
 
 
252
        switch (resp_msg.msg_type) {
 
253
        case RESPONSE_SLURM_RC:
 
254
                rc = ((return_code_msg_t *) resp_msg.data)->return_code;
 
255
                slurm_free_return_code_msg(resp_msg.data);
 
256
                if (rc)
 
257
                        slurm_seterrno_ret(rc);
 
258
                break;
 
259
        default:
 
260
                slurm_seterrno_ret(SLURM_UNEXPECTED_MSG_ERROR);
 
261
                break;
 
262
        }
 
263
        return SLURM_PROTOCOL_SUCCESS;
 
264
}