<div dir="auto">Hi Dejan, <div dir="auto"><br></div><div dir="auto">In my environment, is it possible to launch the check from the hypervisor. A simple telnet against an specific port may be enough tp check if service is ready. </div><div dir="auto"><br></div><div dir="auto">In this simple scenario (and check) how can I instruct the second server to wait the mysql server is up? </div><div dir="auto"><br></div><div dir="auto">Thanks a lot </div></div><div class="gmail_extra"><br><div class="gmail_quote">El 1 mar. 2017 1:08 p. m., &quot;Dejan Muhamedagic&quot; &lt;<a href="mailto:dejanmm@fastmail.fm">dejanmm@fastmail.fm</a>&gt; escribió:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On Sat, Feb 25, 2017 at 09:58:01PM +0100, Oscar Segarra wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Yes,<br>
&gt;<br>
&gt; Database server can be considered started up when it accepts mysql client<br>
&gt; connections<br>
&gt; Applications server can be considered started as soon as the listening port<br>
&gt; is up al accepting connections<br>
&gt;<br>
&gt; ¿Can you provide any example about how to achieve this?<br>
<br>
Is it possible to connect to the database from the supervisor?<br>
Then something like this would do:<br>
<br>
mysql -h vm_ip_address ... &lt; /dev/null<br>
<br>
If not, then if ssh works:<br>
<br>
echo mysql ... | ssh vm_ip_address<br>
<br>
I&#39;m afraid I cannot help you more with mysql details and what to<br>
put in &#39;...&#39; stead above, but it should do whatever is necessary<br>
to test if the database reached the functional state. You can<br>
find an example in ocf:heartbeat:mysql: just look for the<br>
&quot;test_table&quot; parameter. Of course, you&#39;ll need to put that in a<br>
script and test output and so on. I guess that there&#39;s enough<br>
information in internet on how to do that.<br>
<br>
Good luck!<br>
<br>
Dejan<br>
<br>
&gt; Thanks a lot.<br>
&gt;<br>
&gt;<br>
&gt; 2017-02-25 19:35 GMT+01:00 Dejan Muhamedagic &lt;<a href="mailto:dejanmm@fastmail.fm">dejanmm@fastmail.fm</a>&gt;:<br>
&gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; On Thu, Feb 23, 2017 at 08:51:20PM +0100, Oscar Segarra wrote:<br>
&gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; In my environment I have 5 guestes that have to be started up in a<br>
&gt; &gt; &gt; specified order starting for the MySQL database server.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I have set the order constraints and VirtualDomains start in the right<br>
&gt; &gt; &gt; order but, the problem I have, is that the second host starts up faster<br>
&gt; &gt; &gt; than the database server and therefore applications running on the second<br>
&gt; &gt; &gt; host raise errors due to database connectivity problems.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I&#39;d like to introduce a delay between the startup of the VirtualDomain of<br>
&gt; &gt; &gt; the database server and the startup of the second guest.<br>
&gt; &gt;<br>
&gt; &gt; Do you have a way to check if this server is up? If so...<br>
&gt; &gt; The start action of VirtualDomain won&#39;t exit until the monitor<br>
&gt; &gt; action returns success. And there&#39;s a parameter called<br>
&gt; &gt; monitor_scripts (see the meta-data). Note that these programs<br>
&gt; &gt; (scripts) are run at the supervisor host and not in the guest.<br>
&gt; &gt; It&#39;s all a bit involved, but should be doable.<br>
&gt; &gt;<br>
&gt; &gt; Thanks,<br>
&gt; &gt;<br>
&gt; &gt; Dejan<br>
&gt; &gt;<br>
&gt; &gt; &gt; ¿Is it any way to get this?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thanks a lot.<br>
&gt; &gt;<br>
&gt; &gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; &gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt; &gt; &gt; <a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt; &gt; &gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
&gt; &gt; &gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ______________________________<wbr>_________________<br>
&gt; &gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt; &gt; <a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
&gt; &gt;<br>
&gt; &gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt; &gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
&gt; &gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
&gt; &gt;<br>
<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt; <a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</blockquote></div></div>