[ClusterLabs] Insert delay between the statup of VirtualDomain
Oscar Segarra
oscar.segarra at gmail.com
Fri Mar 3 10:58:40 EST 2017
Sorry, but can you please tell me where introduce the mysql check?
Is it not possible to introduce a countdown in order to start a guest 120
seconds after the mysql guest?
Thanks a lot
El 3 mar. 2017 11:51 a. m., "Dejan Muhamedagic" <dejanmm at fastmail.fm>
escribió:
Hi,
On Wed, Mar 01, 2017 at 01:47:21PM +0100, Oscar Segarra wrote:
> Hi Dejan,
>
> 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.
telnet is not so practical for scripts, better use ssh or
the mysql client.
> In this simple scenario (and check) how can I instruct the second server
to
> wait the mysql server is up?
That's what the ordering constraints in pacemaker are for. You
don't need to do anything special.
Thanks,
Dejan
>
> Thanks a lot
>
> El 1 mar. 2017 1:08 p. m., "Dejan Muhamedagic" <dejanmm at fastmail.fm>
> escribió:
>
> > Hi,
> >
> > On Sat, Feb 25, 2017 at 09:58:01PM +0100, Oscar Segarra wrote:
> > > Hi,
> > >
> > > Yes,
> > >
> > > Database server can be considered started up when it accepts mysql
client
> > > connections
> > > Applications server can be considered started as soon as the listening
> > port
> > > is up al accepting connections
> > >
> > > ¿Can you provide any example about how to achieve this?
> >
> > Is it possible to connect to the database from the supervisor?
> > Then something like this would do:
> >
> > mysql -h vm_ip_address ... < /dev/null
> >
> > If not, then if ssh works:
> >
> > echo mysql ... | ssh vm_ip_address
> >
> > I'm afraid I cannot help you more with mysql details and what to
> > put in '...' stead above, but it should do whatever is necessary
> > to test if the database reached the functional state. You can
> > find an example in ocf:heartbeat:mysql: just look for the
> > "test_table" parameter. Of course, you'll need to put that in a
> > script and test output and so on. I guess that there's enough
> > information in internet on how to do that.
> >
> > Good luck!
> >
> > Dejan
> >
> > > Thanks a lot.
> > >
> > >
> > > 2017-02-25 19:35 GMT+01:00 Dejan Muhamedagic <dejanmm at fastmail.fm>:
> > >
> > > > Hi,
> > > >
> > > > On Thu, Feb 23, 2017 at 08:51:20PM +0100, Oscar Segarra wrote:
> > > > > Hi,
> > > > >
> > > > > In my environment I have 5 guestes that have to be started up in a
> > > > > specified order starting for the MySQL database server.
> > > > >
> > > > > I have set the order constraints and VirtualDomains start in the
> > right
> > > > > order but, the problem I have, is that the second host starts up
> > faster
> > > > > than the database server and therefore applications running on the
> > second
> > > > > host raise errors due to database connectivity problems.
> > > > >
> > > > > I'd like to introduce a delay between the startup of the
> > VirtualDomain of
> > > > > the database server and the startup of the second guest.
> > > >
> > > > Do you have a way to check if this server is up? If so...
> > > > The start action of VirtualDomain won't exit until the monitor
> > > > action returns success. And there's a parameter called
> > > > monitor_scripts (see the meta-data). Note that these programs
> > > > (scripts) are run at the supervisor host and not in the guest.
> > > > It's all a bit involved, but should be doable.
> > > >
> > > > Thanks,
> > > >
> > > > Dejan
> > > >
> > > > > ¿Is it any way to get this?
> > > > >
> > > > > Thanks a lot.
> > > >
> > > > > _______________________________________________
> > > > > Users mailing list: Users at clusterlabs.org
> > > > > http://lists.clusterlabs.org/mailman/listinfo/users
> > > > >
> > > > > Project Home: http://www.clusterlabs.org
> > > > > Getting started: http://www.clusterlabs.org/
> > doc/Cluster_from_Scratch.pdf
> > > > > Bugs: http://bugs.clusterlabs.org
> > > >
> > > >
> > > > _______________________________________________
> > > > Users mailing list: Users at clusterlabs.org
> > > > http://lists.clusterlabs.org/mailman/listinfo/users
> > > >
> > > > Project Home: http://www.clusterlabs.org
> > > > Getting started: http://www.clusterlabs.org/
> > doc/Cluster_from_Scratch.pdf
> > > > Bugs: http://bugs.clusterlabs.org
> > > >
> >
> > > _______________________________________________
> > > Users mailing list: Users at clusterlabs.org
> > > http://lists.clusterlabs.org/mailman/listinfo/users
> > >
> > > Project Home: http://www.clusterlabs.org
> > > Getting started: http://www.clusterlabs.org/
doc/Cluster_from_Scratch.pdf
> > > Bugs: http://bugs.clusterlabs.org
> >
> >
> > _______________________________________________
> > Users mailing list: Users at clusterlabs.org
> > http://lists.clusterlabs.org/mailman/listinfo/users
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs: http://bugs.clusterlabs.org
> >
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://lists.clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
_______________________________________________
Users mailing list: Users at clusterlabs.org
http://lists.clusterlabs.org/mailman/listinfo/users
Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20170303/f7b24a8b/attachment-0003.html>
More information about the Users
mailing list