MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / attrd_trigger_update

Function attrd_trigger_update

tools/attrd.c:882–916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

880}
881
882gboolean
883attrd_trigger_update(attr_hash_entry_t * hash_entry)
884{
885 xmlNode *msg = NULL;
886
887 /* send HA message to everyone */
888 crm_notice("Sending flush op to all hosts for: %s (%s)",
889 hash_entry->id, crm_str(hash_entry->value));
890 log_hash_entry(LOG_DEBUG_2, hash_entry, "Sending flush op to all hosts for:");
891
892 msg = create_xml_node(NULL, __FUNCTION__);
893 crm_xml_add(msg, F_TYPE, T_ATTRD);
894 crm_xml_add(msg, F_ORIG, attrd_uname);
895 crm_xml_add(msg, F_ATTRD_TASK, "flush");
896 crm_xml_add(msg, F_ATTRD_ATTRIBUTE, hash_entry->id);
897 crm_xml_add(msg, F_ATTRD_SET, hash_entry->set);
898 crm_xml_add(msg, F_ATTRD_SECTION, hash_entry->section);
899 crm_xml_add(msg, F_ATTRD_DAMPEN, hash_entry->dampen);
900 crm_xml_add(msg, F_ATTRD_VALUE, hash_entry->value);
901#if ENABLE_ACL
902 if (hash_entry->user) {
903 crm_xml_add(msg, F_ATTRD_USER, hash_entry->user);
904 }
905#endif
906
907 if (hash_entry->timeout <= 0) {
908 crm_xml_add(msg, F_ATTRD_IGNORE_LOCALLY, hash_entry->value);
909 attrd_perform_update(hash_entry);
910 }
911
912 send_cluster_message(NULL, crm_msg_attrd, msg, FALSE);
913 free_xml(msg);
914
915 return TRUE;
916}

Callers 2

attrd_local_callbackFunction · 0.85
attrd_timer_callbackFunction · 0.85

Calls 6

log_hash_entryFunction · 0.85
create_xml_nodeFunction · 0.85
crm_xml_addFunction · 0.85
attrd_perform_updateFunction · 0.85
send_cluster_messageFunction · 0.85
free_xmlFunction · 0.85

Tested by

no test coverage detected