<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'><font size="3">Hi Andreas,</font><div style="font-size: 12pt; font-family: 'Times New Roman'; "><br></div><div style="font-size: 12pt; font-family: 'Times New Roman'; ">You are correct, the /etc/init.d/libvirt-bin pseudo-LSB script did not adhere to the LSB specification (e.g. returning exit code 3 when the "status" parameter is passed and the service is stopped) since it is just a legacy alias for the upstart job. I have upgraded to the version of pacemaker in the Ubuntu-HA ppa, which includes the upstart resource agent that I am using now. However, for anyone who does not have access to a version of pacemaker with the upstart resource agent, I developed this modification that could be added to the /etc/init.d script to make it LSB compliant:</div><div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">@@ -42,7 +42,13 @@</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2"> $ECHO</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2"> $ECHO "Since the script you are attempting to invoke has been converted to an"</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2"> $ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">- $COMMAND "$JOB"</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ ### modification start - makes the output LSB compliant (if stopped exit code is 3) ###</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ TEMPSTATUS=`mktemp`</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ $COMMAND "$JOB" | tee $TEMPSTATUS</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ if [ "`grep -q stop $TEMPSTATUS ; echo $?`" = "0" ]; then</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ exit 3</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ fi</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2">+ ### modification stop ###</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2"> ;;</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2"> start|stop|restart)</font></div><div><font face="'courier new', courier, monaco, monospace, sans-serif" size="2"> $ECHO</font></div><div style="font-size: 12pt; font-family: 'Times New Roman'; "><br></div><font size="3">Thanks,</font></div><div style="font-size: 12pt; font-family: 'Times New Roman'; "><br></div><div style="font-size: 12pt; font-family: 'Times New Roman'; ">Andrew</div><div style="font-size: 12pt; font-family: 'Times New Roman'; "><br><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Andreas Ntaflos" <daff@pseudoterminal.org><br><b>To: </b>"The Pacemaker cluster resource manager" <pacemaker@oss.clusterlabs.org>, amartin@xes-inc.com<br><b>Sent: </b>Wednesday, February 15, 2012 4:09:53 PM<br><b>Subject: </b>Re: [Pacemaker] Clone Set does not start its lsb service on all nodes<br><br>On 2012-02-13 23:29, Andrew Martin wrote:<br>> However, often the libvirt-bin daemon is not actually running (and thus<br>> the VMs fail to migrate):<br>> # service libvirt-bin status<br>> libvirt-bin stop/waiting<br><br>It seems the libvirt init script (which is actually an upstart job)<br>either starts the daemon successfully and at some later point the daemon<br>itself fails, or the init script doesn't actually start the libvirt<br>daemon, even though it reports that it did.<br><br>What happens when you start libvirt manually by means of the init script<br>(after disabling the cluster or putting it into maintenance mode)? What<br>does /var/log/libvirt/libvirtd.log say?<br><br>Please also do the tests described in [1] to determine whether the<br>libvirt init script/upstart job behaves according to LSB specifications.<br><br>Also, to avoid any interferenc, you have to take care that only<br>pacemaker and not upstart has full control over starting and stopping<br>the libvirt daemon, i.e. making sure libvirt isn't started on system<br>startup. Usually this is done by means of update-rc.d, but this doesn't<br>work with upstart jobs. For Ubuntu 10.04 it means commenting the "start<br>on ..." and possibly "stop on ..." lines at the beginning of<br>/etc/init/libvirt-bin.conf.<br><br>> This does not seem like the correct behavior for the clone - my<br>> understanding is that a clone requires the resource to be running at all<br>> nodes at all times. What can I try to ensure that libvirt-bin remains<br>> running on all nodes?<br><br>I don't think pacemaker is the problem here. It seems more like your<br>libvirt daemons are misbehaving.<br><br>Andreas<br><br>[1]<br>http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ap-lsb.html<br><br></div><br></div></div></body></html>