/[slony-test]/adsl/05_kill_master.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /adsl/05_kill_master.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Sun Feb 11 21:52:48 2007 UTC (17 years, 2 months ago) by dpavlin
File MIME type: application/x-sh
File size: 636 byte(s)
initial import

1 dpavlin 1
2    
3     echo "kill all master processes"
4     sudo kill `ps ax | grep slon_watchdog | grep node1 | cut -c-6`
5     sudo kill `ps ax | grep 192.168.0.1 | cut -c-6`
6     echo "interface down"
7     sudo ifconfig lo:1 down
8     sudo iptables -A INPUT -d 192.168.0.1 -j REJECT
9     sudo pg_ctlcluster 8.2 master stop
10     sudo ifconfig lo:2 192.168.0.2 up
11    
12     ln -sf /usr/local/etc/slon_tools.conf-slave_origin /usr/local/etc/slon_tools.conf
13    
14     echo "stop slony"
15     sudo slon_kill
16    
17     echo "restart slave cluster"
18     sudo pg_ctlcluster 8.2 slave restart || sudo pg_ctlcluster 8.2 slave start
19    
20     echo "failover to slave"
21     slonik_failover 1 2 | slonik
22    
23     #echo "drop node1"
24     #slonik_drop_node 1 | slonik
25    

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26