From: Bruce Edge Subject: Re: Is there a way to get notification, when a domain shutdown/restarts Date: Mon, 21 Sep 2009 09:39:10 -0700 Message-ID: <45c43ef50909210939i4f14260al1833cc4d320a6909@mail.gmail.com> References: <8686c3cd0909160651s663c75f2i1fe7c23efb25ca56@mail.gmail.com> <4AB2E9E7.6010704@redhat.com> <8686c3cd0909210425v367b1a73t907e98c9df539352@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1956959216==" Return-path: In-Reply-To: <8686c3cd0909210425v367b1a73t907e98c9df539352@mail.gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1956959216== Content-Type: multipart/alternative; boundary=000e0cd6aa0609b2430474191f39 --000e0cd6aa0609b2430474191f39 Content-Type: text/plain; charset=ISO-8859-1 You could use something like the monit package to monitor the domU through a variety of methods, ping, socket connect, etc. The config allows one to specify multiple rules to detect and take action based upon events. It would be trivial to monitor a domU via ping and restart it if it stopper responding. It's also less code you have to maintain yourself :-) -Bruce On Mon, Sep 21, 2009 at 4:25 AM, Tom Rotenberg wrote: > Well, i was looking for a solution, which won't require me to modify > teh code, but to use an already-built mechaism for this, but i guess > none exists, so i'll modify the code for this. > > Thanks! > > > On Fri, Sep 18, 2009 at 5:01 AM, Michal Novotny > wrote: > > On 09/16/2009 03:51 PM, Tom Rotenberg wrote: > >> > >> Hi, > >> > >> I would like to write a script, which will run, every time my > >> (specific) domain reboots or shutdown. Is there any way, to "catch" > >> those events, or to be notified when it happens? > >> > >> Tom > >> > > > > Hi Tom, > > I am not sure about that but you can modify python script to call this > > script in this event. There should be some method to be called every time > > the domain reboots/shuts down. There you can add a call to you script or > > write it purely in python. I think it's somewhere in XendDomainInfo.py > file > > somewhere in python site-packages directory. > > > > Michal > > > >> _______________________________________________ > >> Xen-devel mailing list > >> Xen-devel@lists.xensource.com > >> http://lists.xensource.com/xen-devel > >> > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > --000e0cd6aa0609b2430474191f39 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable You could use something like the monit package to monitor the domU through = a variety of methods, ping, socket connect, etc. The config allows one to s= pecify multiple rules to detect and take action based upon events.
It w= ould be trivial to monitor a domU via ping and restart it if it stopper res= ponding.

It's also less code you have to maintain yourself :-)

-Bruce=

On Mon, Sep 21, 2009 at 4:25 AM, Tom Rot= enberg <tom= .rotenberg@gmail.com> wrote:
Well, i was looki= ng for a solution, which won't require me to modify
teh code, but to use an already-built mechaism for this, but i guess
none exists, so i'll modify the code for this.

Thanks!


On Fri, Sep 18, 2009 at 5:01 AM, Michal Novotny <minovotn@redhat.com> wrote:
> On 09/16/2009 03:51 PM, Tom Rotenberg wrote:
>>
>> Hi,
>>
>> I would like to write a script, which will run, every time my
>> (specific) domain reboots or shutdown. Is there any way, to "= catch"
>> those events, or to be notified when it happens?
>>
>> Tom
>>
>
> Hi Tom,
> I am not sure about that but you can modify python script to call this=
> script in this event. There should be some method to be called every t= ime
> the domain reboots/shuts down. There you can add a call to you script = or
> write it purely in python. I think it's somewhere in XendDomainInf= o.py file
> somewhere in python site-packages directory.
>
> Michal
>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.x= ensource.com
>> http://lists.xensource.com/xen-devel
>>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenso= urce.com
> htt= p://lists.xensource.com/xen-devel
>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.= com
http://l= ists.xensource.com/xen-devel

--000e0cd6aa0609b2430474191f39-- --===============1956959216== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1956959216==--