<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
What is the best way to make sure pacemaker doesn’t attempt to recover or restart a resource if a resource it depends on is not started?
<div class=""><br class="">
</div>
<div class="">For example, we have two dummy resources that simply sleep - master_sleep and slave_sleep.  We then have a non-symmetrical ordering constraint that ensures master_sleep is started before slave_sleep:</div>
<div class="">
<div class="" style="margin: 0px; font-stretch: normal; font-size: 11px; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);">
<span class="" style="font-variant-ligatures: no-common-ligatures;">  start master_</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(195, 55, 32);"><b class="">sleep</b></span><span class="" style="font-variant-ligatures: no-common-ligatures;"> then
 start slave_</span><span class="" style="font-variant-ligatures: no-common-ligatures; color: rgb(195, 55, 32);"><b class="">sleep</b></span><span class="" style="font-variant-ligatures: no-common-ligatures;"> (kind:Mandatory) (non-symmetrical)</span></div>
</div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">This works as expected when both resources are disabled.  If we enable slave_sleep first, it won’t actually start until after master_sleep if enabled and started.</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">However, if slave_sleep dies when master_sleep is disabled and stopped, pacemaker recovers and restarts slave_sleep.  For example:</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">- enable master_sleep, and wait for it to start</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">- enable slave_sleep, and wait for it to start</span></div>
<div class="">- disable master_sleep, and wait for it to stop</div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">- kill the slave_sleep process (or, “pcs resource debug-stop slave_sleep”)</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">- pacemaker recovers and restarts slave_sleep, even though master_sleep is disabled and stopped.</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">Is this the expected behavior, and is there any way to change it?  I’m happy to provide logs if that would help.</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;"><br class="">
</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">Many thanks,</span></div>
<div class=""><span class="" style="font-variant-ligatures: no-common-ligatures;">Devin</span></div>
</body>
</html>