Hi,

On Thu, Jul 12, 2012 at 03:05:28PM +0200, Helmut Wollmersdorfer wrote:
> Hi,
> 
> 
> today one DomU running mainly Apache, Typo3, MySQL went unusable.
> 
> Last message from Nagios:
> 
> Ram : 98%, Swap : 100% :  99, 90 : CRITICAL
> 
> Logging in with xm console I saw oom-killer messages and did an xm  
> destroy.
> 
> Is there any solution to automatically destroy and restart a DomU in  
> such a case?

You can add the script hook to your xen resource. See:

 crm ra info Xen
...
monitor_scripts (string): list of space separated monitor scripts
    To additionally monitor services within the unprivileged domain,
    add this parameter with a list of scripts to monitor.
...

A script should exit with 0 on success. I guess that you can
just do curl URL which exercises the apache and/or mysql.

Thanks,

Dejan


> The current crm config is as follows (only the relevant part of one  
> DomU):
> 
> 
> xen11:/# crm configure show
> node $id="xxx" xen11
> node $id="yyy" xen10
> 
> 
> primitive xen_drbd2_1 ocf:linbit:drbd \
>       params drbd_resource="drbd2_1" \
>       op monitor interval="15s" \
>       op start interval="0" timeout="240s" \
>       op stop interval="0" timeout="100s"
> primitive xen_drbd2_2 ocf:linbit:drbd \
>       params drbd_resource="drbd2_2" \
>       op monitor interval="15s" \
>       op start interval="0" timeout="240s" \
>       op stop interval="0" timeout="100s"
> primitive xen_typo3 ocf:heartbeat:Xen \
>       params xmfile="/etc/xen/typo3.cfg" \
>       op monitor interval="3s" timeout="30s" \
>       op start interval="0" timeout="60s" \
>       op stop interval="0" timeout="40s" \
>       meta target-role="Started" allow-migrate="false" is-managed="true"
> 
> 
> group group_drbd2 xen_drbd2_1 xen_drbd2_2
> 
> ms DrbdClone2 group_drbd2 \
>       meta master_max="1" master-mode-max="1" clone-max="2" clone-node- 
> max="1" notify="true"
> 
> location cli-prefer-xen_typo3 xen_typo3 \
>       rule $id="cli-prefer-rule-xen_typo3" inf: #uname eq xen10
> 
> colocation xen_typo3_and_drbd inf: xen_typo3 DrbdClone2:Master
> 
> order xen_typo3_after_drbd inf: DrbdClone2:promote xen_typo3:start
> 
> property $id="cib-bootstrap-options" \
>       dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
>       cluster-infrastructure="Heartbeat" \
>       stonith-enabled="false" \
>       no-quorum-policy="ignore" \
>       last-lrm-refresh="1331211005" \
>       maintenance-mode="false"
> rsc_defaults $id="rsc-options" \
>       resource-stickiness="100"
> 
> 
> TIA
> 
> Helmut Wollmersdorfer
> 
> 
> 
> 
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to