Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.3:Staging:A
pacemaker
pacemaker-crmd-start-state-remove-functions.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-crmd-start-state-remove-functions.patch of Package pacemaker
commit 5ca53f2d7edbd987bdbfc941e01bda7b89311382 Author: Zhuravleva Aleksandra <zhuravleva357@gmail.com> Date: Tue Mar 28 07:38:18 2017 +0300 remove functions from crmd_utils.c diff --git a/crmd/crmd_utils.h b/crmd/crmd_utils.h index 1acba01f3..a1aaad32d 100644 --- a/crmd/crmd_utils.h +++ b/crmd/crmd_utils.h @@ -90,7 +90,6 @@ xmlNode *create_node_state_update(crm_node_t *node, int flags, void populate_cib_nodes(enum node_update_flags flags, const char *source); void crm_update_quorum(gboolean quorum, gboolean force_update); void erase_status_tag(const char *uname, const char *tag, int options); -void init_transient_attrs(const char *uname, const char *start_state, int options); void update_attrd(const char *host, const char *name, const char *value, const char *user_name, gboolean is_remote_node); void update_attrd_remote_node_removed(const char *host, const char *user_name); void update_attrd_clear_failures(const char *host, const char *rsc, diff --git a/crmd/utils.c b/crmd/utils.c index 82b544869..07c323d2f 100644 --- a/crmd/utils.c +++ b/crmd/utils.c @@ -1008,56 +1008,6 @@ erase_status_tag(const char *uname, const char *tag, int options) } } -static void -crm_set_join_state(const char *uname, const char *start_state) -{ - if (safe_str_eq(start_state, "standby")) { - crm_notice("Forcing node %s to join in %s state per configured environment", uname, start_state); - update_attrd(uname, XML_CIB_ATTR_STANDBY, "on", NULL, FALSE); - } else if (safe_str_eq(start_state, "online")) { - crm_notice("Forcing node %s to join in %s state per configured environment", uname, start_state); - update_attrd(uname, XML_CIB_ATTR_STANDBY, "off", NULL, FALSE); - } else if (safe_str_eq(start_state, "default")) { - crm_debug("Not forcing a starting state on node %s", uname); - } else { - crm_warn("Unrecognized start state '%s', using 'default' (%s)", start_state, uname); - } -} - -static void -init_attrs_callback(xmlNode * msg, int call_id, int rc, xmlNode * output, void *user_data) -{ - char **data = (char**)user_data; - char *uname = data[0]; - char *start_state = data[1]; - char *xpath = data[2]; - - do_crm_log_unlikely(rc == 0 ? LOG_DEBUG : LOG_NOTICE, - "Erasing of \"%s\": %s (rc=%d)", xpath, pcmk_strerror(rc), rc); - crm_set_join_state(uname, start_state); - free(data[0]); - free(data[1]); - free(data[2]); -} - -void -init_transient_attrs(const char *uname, const char *start_state, int options) -{ - if (fsa_cib_conn && uname) { - int rc; - char *xpath = crm_strdup_printf("//node_state[@uname='%s']/%s", uname, XML_TAG_TRANSIENT_NODEATTRS); - int cib_opts = cib_quorum_override | cib_xpath | options; - const char **data = malloc(sizeof(char*)*3); - data[0] = strdup(uname); - data[1] = strdup(start_state); - data[2] = strdup(xpath); - - crm_info("Erasing transient attributes for %s", uname); - rc = fsa_cib_conn->cmds->delete(fsa_cib_conn, xpath, NULL, cib_opts); - fsa_register_cib_callback(rc, FALSE, data, init_attrs_callback); - } -} - void crmd_peer_down(crm_node_t *peer, bool full) { if(full && peer->state == NULL) {
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