Re: The continuing saga of Buckaroo Croft in LVS land....

"Sören Malchow" <[email protected]>
Newsgroups gmane.linux.redhat.piranha
Message-ID <OF9A99782A.365DB3C9-ONC1256D11.0073542C-C1256D11.0073AAA7@agencynet.de>
hi edward, 

this one example of (as you can see) squid httpd and dns failover 
services, those are up and running in a production environment, maybe that 
helps

primary = 172.26.3.100
service = fos
rsh_command = ssh
backup_active = 1
backup = 172.26.3.101
heartbeat = 1
heartbeat_port = 1050
keepalive = 6
deadtime = 120
network = nat
nat_router = 192.168.10.100 eth1:1
nat_nmask = 255.255.255.255
debug_level = NONE
failover dns {
     address = 172.26.3.102 eth0:1
     vip_nmask = 255.255.255.0
     active = 1
     port = 53
     timeout = 6
     start_cmd = "/etc/init.d/named start"
     stop_cmd = "/etc/init.d/named stop"
}
failover httpd {
     address = 172.26.3.102 eth0:1
     vip_nmask = 255.255.255.0
     active = 1
     port = 80
     timeout = 6
     start_cmd = "/etc/init.d/httpd start"
     stop_cmd = "/etc/init.d/httpd stop"
}
failover squid {
     address = 172.26.3.102 eth0:1
     vip_nmask = 255.255.255.0
     active = 1
     port = 8080
     timeout = 6
     start_cmd = "/etc/init.d/squid start"
     stop_cmd = "/etc/init.d/squid stop"
}



Soeren Malchow
Head of Central Technical Services

Fon. ++49.(0)40.432.969-547
Mobile: ++49.(0)151.1216.8451
Fax +49.(0)40.432.969-90
E-Mail: [email protected]

http://www.bbdo-interone.de

BBDO InterOne
Schulterblatt 58

20357 Hamburg/Germany


NOTE: This communication is confidential and is intended for the use of
the individual or entity to which it is directed. It may contain 
information
that is privileged and exempt from disclosure under applicable law. If you
are not the intended recipient please notify us immediately. You should
not copy it or disclose its contents to any other person.

 _______________________________________________





Edward Croft <[email protected]>
Sent by: [email protected]
23.04.2003 20:37
Please respond to piranha-list
 
        To:     Pirahna List server <[email protected]>
        cc: 
        Subject:        The continuing saga of Buckaroo Croft in LVS 
land....


Many thanks to those that helped me to resolve the LVS portion of my
project. I now have load balancing to my http servers working like a
charm. I still have the DBS portion of the project that does not seem to
work. In this case, I am using FOS. I don't see many examples utilizing
FOS. Most are using lvs for load balancing. Anyway, here is my lvs.cf
from my db servers. Note the send is a script I wrote that actually
pulls data from the db server rather than just sensing if the process
was running. It responds OK if it can retrieve data, Failed, if it does
not. I have included the start and stop scripts also, since those use
su. I don't know under which user piranha runs, so that could be part of
the problem since it needs to su to user postgres to start/stop the db.

lvs.cf

serial_no = 22
primary = 10.0.13.5
service = fos
backup_active = 1
backup = 10.0.13.6
heartbeat = 1
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = direct
reservation_conflict_action = preempt
debug_level = 2
failover spdb {
     address = 10.0.13.30 aft0:1
     vip_nmask = 255.255.255.0
     active = 1
     timeout = 6
     send_program = "/scripts/check_pgsql_alive"
     expect = "OK"
     start_cmd = "/scripts/startdb"
     stop_cmd = "/scripts/stopdb"
}




startdb

cd /var/lib/pgsql/data
su - postgres -c "/var/lib/pgsql/data/start_db"
echo "started db"


stopdb

cd /var/lib/pgsql/data
su - postgres -c "/var/lib/pgsql/data/stop_db"
echo "stopped db"


I had originally put the su - postgres..... in the start_cmd/stop_cmd
fields, but figured this might work better as the dbadmin created the
/var/lib/pgsql/data/start_db script to use the current directory for the
log anticipating that it would be started in the /var/lib/pgsql/data
directory. Go figure!

Anyway, You quickly helped me to resolve phase 1, the LVS servers. I can
only hope that someone can figure this one out too.
BTW, if I manually run the check_pgsql_alive script, I do get OK if the
server is running and failed if not. Also, if I manually start the
server, I can get to it from the shared address. 

TIA, Ed Croft





_______________________________________________
Piranha-list mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/piranha-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.