HomeClusterLabs Projects

Feature: libcluster: send notifications when pacemaker_remote nodes are started

Description

Feature: libcluster: send notifications when pacemaker_remote nodes are started

This adds a new public API function crm_remote_peer_get(), which reduces code
duplication in crm_remote_peer_cache_add() and remote_cache_refresh_helper(),
and fixes a minor issue where a pointer was asserted to be non-NULL after it
had already been dereferenced. Differences in behavior:

  • crm_remote_peer_get() calls crm_update_peer_uname() to set the node name, meaning that peer status callbacks will be called appropriately. The only effect is more consistent log messages for cluster and remote nodes.
  • crm_remote_peer_cache_add() now leaves the cache entry's state as NULL (unknown) rather than always set to member. Attrd is the only user of this function in pacemaker code, and it doesn't use state.
  • crm_remote_peer_cache_refresh() now calls crm_update_peer_state() to set the node state, meaning that peer status callbacks will be called appropriately. The most visible effect is that notification scripts will now be called for the initial spin-up of a pacemaker_remote node.

Details

Provenance
kgaillotAuthored on Oct 5 2015, 11:43 AM
Parents
rPd6fee14ad952: Refactor: crmd: handle pacemaker_remote nodes in peer status callback
Branches
Unknown
Tags
Unknown

Event Timeline