Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
pacemaker.3577
bug-981489_pacemaker-crmd-set-shutdown-attribut...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bug-981489_pacemaker-crmd-set-shutdown-attribute-remote-request.patch of Package pacemaker.3577
commit 0a883a90eeeee4c9b156023da693d4ff93a9d69a Author: Andrew Beekhof <andrew@beekhof.net> Date: Wed Jan 6 15:17:06 2016 +1100 Feature: crmd: Set the shutdown transient attribute in response to LRMD_IPC_OP_SHUTDOWN_REQ from remote nodes diff --git a/crmd/lrm_state.c b/crmd/lrm_state.c index 5ee5b83..7833ebb 100644 --- a/crmd/lrm_state.c +++ b/crmd/lrm_state.c @@ -478,17 +478,23 @@ remote_proxy_cb(lrmd_t *lrmd, void *userdata, xmlNode *msg) CRM_CHECK(op != NULL, return); CRM_CHECK(session != NULL, return); + crm_element_value_int(msg, F_LRMD_IPC_MSG_ID, &msg_id); + /* This is msg from remote ipc client going to real ipc server */ + if (safe_str_eq(op, LRMD_IPC_OP_SHUTDOWN_REQ)) { - crm_warn("Graceful proxy shutdown not yet supported"); - /* TODO: uncomment this, then put node in standby: */ - /* remote_proxy_ack_shutdown(lrmd); */ - return; - } + char *now_s = NULL; + time_t now = time(NULL); - crm_element_value_int(msg, F_LRMD_IPC_MSG_ID, &msg_id); + crm_warn("Graceful proxy shutdown of %s not yet tested", lrm_state->node_name); - /* This is msg from remote ipc client going to real ipc server */ - if (safe_str_eq(op, LRMD_IPC_OP_NEW)) { + now_s = crm_itoa(now); + update_attrd(lrm_state->node_name, XML_CIB_ATTR_SHUTDOWN, now_s, NULL, FALSE); + free(now_s); + + remote_proxy_ack_shutdown(lrmd); + return; + + } else if (safe_str_eq(op, LRMD_IPC_OP_NEW)) { const char *channel = crm_element_value(msg, F_LRMD_IPC_IPC_SERVER); CRM_CHECK(channel != NULL, return);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor