[DRBD-user] crm-fence-peer / crm-unfence-peer never terminates

Lars Ellenberg lars.ellenberg at linbit.com
Mon Nov 3 22:45:50 CET 2014

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Tue, Oct 21, 2014 at 05:18:30PM +0200, Felix Zachlod wrote:
> Hello group,
> 
> I have configured the following:
> 
> 
>         handlers {
>                 fence-peer              "/usr/lib/drbd/crm-fence-peer.sh";
>                 after-resync-target
> "/usr/lib/drbd/crm-unfence-peer.sh";
>         }
> 
> 
> As well as
> 
>         disk {
>                 fencing resource-and-stonith;
>         }
> 
> 
> While the fencing and unfencing in case of the lost replication link
> works as expected - the resource is being demoted / promoted on one
> side and the data is marked outdated, it always leaves a process
> behind
> 
> 
> 29522 ?        S      0:00 /bin/bash /usr/lib/drbd/crm-fence-peer.sh
> 29523 ?        S      0:00  \_ logger -t crm-fence-peer.sh[29521] -p
> local5.info
> 
> The script seems actually to be waiting for the sub process to
> terminate, which does not as the logger command which is invoked
> here waits for data on stdin and actually nothing is logged. As soon
> as I kill the logger process the parent script is terminating too.
> 
> I can observe this in every server with different versions of the
> cluster stack always running drbd 8.4.5 and drbd-utils 8.9.1. Every
> stop and start of a resource leave a crm-unfence-peer.sh process
> behind and every fencing action leaves a crm-fence-peer.sh process
> behind.
> 
> I have tried this running pacemaker 1.1.7, 1.1.10 and 1.1.12 and
> always see the same behaviour.
> 
> What am I doing wrong here?

This seems to behave different with different setups,
platforms and bash versions. 

It's not the main "crm-fence-peer.sh", btw,
so the fencing script as such *does* terminate.
It's some intermediate subshell that keeps hanging around.

This should be fixed with commit
"crm-fence-peer.sh: logger: avoid subshell"
http://git.linbit.com/gitweb.cgi?p=drbd-utils.git;a=commit;h=e871d3c52bb110c170068fa496a871e5b187490e


-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list