Re: Run a script automatically when an IP is added

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Will VIP relocation trigger it? <---- unfortunately, i have not an RAC
environment to try it and i've never used somethig like this, but maybe the
answer is yes, because the resource moves with de vip.


1. appvipcfg create -network=1 -ip <your_vip> -vipname myapp -user=root

2. crsctl start rest myapp

3 cat myapp.sh

#!/bin/bash
case $1 in
'start')
(your script)
;;
'stop')
(your script).
;;
esac

exit 0

4. cat myapp_profile

ACTION_SCRIPT=[ANY_PATH]/myapp.sh
HOSTING_MEMBERS= host1 [host2 host3]
START_DEPENDENCIES=hard(myapp)
STOP_DEPENDENCES=hard(myapp)

crsctl add resource myresource -type=cluster_resource -file myapp_profile

crsctl start resource myresource

Regards
Pedro


2014-08-28 18:40 GMT+02:00 Yong Huang <yong321@xxxxxxxxx>:

> Thanks Pedro. How will the action script for the new profile be triggered?
> Will VIP relocation trigger it?
>
> I already tested Oracle RAC's FAN callout, i.e., a script in
> $GRID_HOME/racg/usrco is run on certain events. It works on instance or
> service up or down event. But it does NOT work on VIP relocation (crsctl
> relocate resource ora.thisserver.vip -n anotherserver).
>
> Camero, thanks. I already scheduled a cron job to do exactly what you
> described. But it's not *triggered* on VIP relocation. So it's not ideal.
>
>
-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list




[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux