Skip to contentSkip to conversation

Is there a way to get notification, when a domain shutdown/restarts

DISCUSSION Tom Rotenberg 3 participants 4 messages Sep 16, 2009 – Sep 21, 2009

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 8 lines · Tom Rotenberg

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

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

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!

Quoted 32 lines · Michal Novotny
Quoted 9 lines · Tom Rotenberg

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

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw

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

Quoted 43 lines · Tom Rotenberg

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!

Quoted 8 lines · Michal Novotny
Quoted 7 lines · Tom Rotenberg

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?

Quoted 8 lines
Quoted 2 lines

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

Quoted 11 lines

somewhere in python site-packages directory.

Michal

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 5 lines

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel