Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Update
pacemaker.8750
pacemaker-crmd-set_standby-in-first_join.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-crmd-set_standby-in-first_join.patch of Package pacemaker.8750
commit 2d87de41730f5b9bc644de90e1a9c47ae97ce00f Author: Zhuravleva Aleksandra <zhuravleva357@gmail.com> Date: Sun Mar 26 08:34:19 2017 +0300 set_standby in first_join diff --git a/crmd/join_client.c b/crmd/join_client.c index ede9bd103..0ba671daf 100644 --- a/crmd/join_client.c +++ b/crmd/join_client.c @@ -251,15 +251,26 @@ do_cl_join_finalize_respond(long long action, */ if (first_join && is_not_set(fsa_input_register, R_SHUTDOWN)) { first_join = FALSE; + erase_status_tag(fsa_our_uname, XML_TAG_TRANSIENT_NODEATTRS, 0); + update_attrd(fsa_our_uname, "terminate", NULL, NULL, FALSE); + update_attrd(fsa_our_uname, XML_CIB_ATTR_SHUTDOWN, "0", NULL, FALSE); if (start_state) { - init_transient_attrs(fsa_our_uname, start_state, 0); - } else { - erase_status_tag(fsa_our_uname, XML_TAG_TRANSIENT_NODEATTRS, 0); - } + if (safe_str_eq(start_state, "standby")) { + crm_notice("Forcing node %s to join in %s state per configured environment", fsa_our_uname, start_state); + set_standby(fsa_cib_conn, fsa_our_uuid, NULL, "on"); - update_attrd(fsa_our_uname, "terminate", NULL, NULL, FALSE); - update_attrd(fsa_our_uname, XML_CIB_ATTR_SHUTDOWN, "0", NULL, FALSE); + } else if (safe_str_eq(start_state, "online")) { + crm_notice("Forcing node %s to join in %s state per configured environment", fsa_our_uname, start_state); + set_standby(fsa_cib_conn, fsa_our_uuid, NULL, "off"); + + } else if (safe_str_eq(start_state, "default")) { + crm_debug("Not forcing a starting state on node %s", fsa_our_uname); + + } else { + crm_warn("Unrecognized start state '%s', using 'default' (%s)", start_state, fsa_our_uname); + } + } } send_cluster_message(crm_get_peer(0, fsa_our_dc), crm_msg_crmd, reply, TRUE); diff --git a/crmd/te_actions.c b/crmd/te_actions.c index c41d44d2c..a8ad86f94 100644 --- a/crmd/te_actions.c +++ b/crmd/te_actions.c @@ -103,8 +103,6 @@ send_stonith_update(crm_action_t * action, const char *target, const char *uuid) /* zero out the node-status & remove all LRM status info */ xmlNode *node_state = NULL; - const char *start_state = daemon_option("node_start_state"); - CRM_CHECK(target != NULL, return); CRM_CHECK(uuid != NULL, return); @@ -153,11 +151,7 @@ send_stonith_update(crm_action_t * action, const char *target, const char *uuid) /* fsa_cib_conn->cmds->bump_epoch(fsa_cib_conn, cib_quorum_override|cib_scope_local); */ erase_status_tag(peer->uname, XML_CIB_TAG_LRM, cib_scope_local); - if (start_state) { - init_transient_attrs(peer->uname, start_state, cib_scope_local); - } else { - erase_status_tag(peer->uname, XML_TAG_TRANSIENT_NODEATTRS, cib_scope_local); - } + erase_status_tag(peer->uname, XML_TAG_TRANSIENT_NODEATTRS, cib_scope_local); free_xml(node_state); 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