| 880 | } |
| 881 | |
| 882 | gboolean |
| 883 | attrd_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 | } |
no test coverage detected