File pacemaker-attrd-improve-log-messages.patch of Package pacemaker.14737
commit 0f1f2ab18e47402f5263d9fe52b2ec3c46460807
Author: Ken Gaillot <kgaillot@redhat.com>
Date: Tue Aug 15 11:55:54 2017 -0500
Log: attrd: improve messages
Get rid of a redundant "Election complete" trace (it's already logged at info
level elsewhere), lower a mostly-redundant CIB connection message to debug,
and add a debug when we write out all attributes.
Index: pacemaker-1.1.16+20170320.77ea74d/attrd/commands.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/attrd/commands.c
+++ pacemaker-1.1.16+20170320.77ea74d/attrd/commands.c
@@ -921,8 +921,6 @@ write_or_elect_attribute(attribute_t *a)
gboolean
attrd_election_cb(gpointer user_data)
{
- crm_trace("Election complete");
-
free(peer_writer);
peer_writer = strdup(attrd_cluster->uname);
@@ -1017,10 +1015,11 @@ write_attributes(bool all, bool peer_dis
GHashTableIter iter;
attribute_t *a = NULL;
+ crm_debug("Writing out %s attributes", all? "all" : "changed");
g_hash_table_iter_init(&iter, attributes);
while (g_hash_table_iter_next(&iter, NULL, (gpointer *) & a)) {
if (peer_discovered && a->unknown_peer_uuids) {
- /* a new peer uuid has been discovered, try writing this attribute again. */
+ // Try writing this attribute again, in case peer ID was learned
a->changed = TRUE;
}
Index: pacemaker-1.1.16+20170320.77ea74d/attrd/main.c
===================================================================
--- pacemaker-1.1.16+20170320.77ea74d.orig/attrd/main.c
+++ pacemaker-1.1.16+20170320.77ea74d/attrd/main.c
@@ -145,7 +145,7 @@ attrd_cib_connect(int max_retry)
goto cleanup;
}
- crm_info("Connected to the CIB after %d attempts", attempts);
+ crm_debug("Connected to the CIB after %d attempts", attempts);
rc = connection->cmds->set_connection_dnotify(connection, attrd_cib_destroy_cb);
if (rc != pcmk_ok) {