Skip to content

Commit

Permalink
Log: crmd,libcrmcluster: minor log message improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kgaillot committed Feb 7, 2017
1 parent 8b61ec1 commit 2af9bf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crmd/lrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,8 @@ notify_deleted(lrm_state_t * lrm_state, ha_msg_input_t * input, const char *rsc_
const char *from_host = crm_element_value(input->msg, F_CRM_HOST_FROM);

crm_info("Notifying %s on %s that %s was%s deleted",
from_sys, from_host, rsc_id, rc == pcmk_ok ? "" : " not");
from_sys, (from_host? from_host : "localhost"), rsc_id,
((rc == pcmk_ok)? "" : " not"));

op = construct_op(lrm_state, input->xml, rsc_id, CRMD_ACTION_DELETE);
CRM_ASSERT(op != NULL);
Expand Down
6 changes: 4 additions & 2 deletions lib/cluster/membership.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <crm/msg_xml.h>
#include <crm/stonith-ng.h>

#define s_if_plural(i) (((i) == 1)? "" : "s")

/* The peer cache remembers cluster nodes that have been seen.
* This is managed mostly automatically by libcluster, based on
* cluster membership events.
Expand Down Expand Up @@ -361,8 +363,8 @@ reap_crm_member(uint32_t id, const char *name)
search.uname = name ? strdup(name) : NULL;
matches = g_hash_table_foreach_remove(crm_peer_cache, crm_reap_dead_member, &search);
if(matches) {
crm_notice("Purged %d peers with id=%u%s%s from the membership cache",
matches, search.id,
crm_notice("Purged %d peer%s with id=%u%s%s from the membership cache",
matches, s_if_plural(matches), search.id,
(search.uname? " and/or uname=" : ""),
(search.uname? search.uname : ""));

Expand Down

0 comments on commit 2af9bf8

Please sign in to comment.