Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

[SSI] openssi/openssi-tools/net/ha-lvs ipvswrap.c,1.1,1.2 ipvswrap.h,1.1,1.: msg#00091

Subject: [SSI] openssi/openssi-tools/net/ha-lvs ipvswrap.c,1.1,1.2 ipvswrap.h,1.1,1.2 sig_handler.c,1.6,1.7
Update of /cvsroot/ssic-linux/openssi/openssi-tools/net/ha-lvs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8517

Modified Files:
      Tag: OPENSSI-RH
        ipvswrap.c ipvswrap.h sig_handler.c 
Log Message:
Added function lvs_flush_virtual_table() to flush the ipvs virtual table. 
Added code to stop lvs sync thread at exit.



Index: ipvswrap.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/openssi-tools/net/ha-lvs/ipvswrap.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ipvswrap.c  9 Jun 2003 21:30:59 -0000       1.1
+++ ipvswrap.c  9 Nov 2004 05:35:17 -0000       1.2
@@ -125,3 +125,26 @@
        return 1;
 
 }
+
+int
+lvs_flush_virtual_table(void)
+{
+       struct ip_vs_rule_user urule;
+       int result;
+
+       if (ipvs_init()) {
+               syslog(LOG_WARNING, "Failed to initialize IPVS service\n");
+               return -1;
+       }
+
+       memset(&urule, 0, sizeof(struct ip_vs_rule_user));
+       result = ipvs_command(IP_VS_SO_SET_FLUSH, &urule);
+       if (result) {
+               syslog(LOG_WARNING, "%s\n", ipvs_strerror(errno));
+               ipvs_close();
+               return -1;
+       }
+
+       ipvs_close();
+       return 1;
+}

Index: ipvswrap.h
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/openssi-tools/net/ha-lvs/ipvswrap.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ipvswrap.h  9 Jun 2003 21:30:59 -0000       1.1
+++ ipvswrap.h  9 Nov 2004 05:35:17 -0000       1.2
@@ -23,5 +23,6 @@
 
 extern int ipvs_cleanup_realserver(char *);
 extern int lvs_sync_daemon( char * , char *, char *);
+extern int lvs_flush_virtual_table(void);
 
 #endif /* _LIBIPVS_IPVSWRAP_H_ */

Index: sig_handler.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/openssi-tools/net/ha-lvs/sig_handler.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sig_handler.c       18 Oct 2004 11:44:14 -0000      1.6
+++ sig_handler.c       9 Nov 2004 05:35:17 -0000       1.7
@@ -227,6 +227,8 @@
 
                                        del_cvip(cvip_confp->cvip);
                                        remove_cvip_entry(fp,cvip_confp->cvip);
+                                       lvs_sync_daemon("stop","master",
+                                       get_multicast_interface(this_node));
                                }               
                                else { /* I am a director-backup */ 
 
@@ -244,7 +246,10 @@
                                                exit(1);
                                        }
                                        while( wait(NULL) > 0 );
+                                       lvs_sync_daemon("stop","backup",
+                                       get_multicast_interface(this_node));
                                }
+                               lvs_flush_virtual_table();
                                break;
                        }
                } /* end for() */



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
hardware.arm.at...    cms.citadel.dev...    video.gstreamer...    java.facelets.u...    misc.basics.qna...    web.wiki.instik...    network.uip.use...    xdg.devel/2003-...    tex.bibtex.bibd...    finance.quotesp...    ietf.zeroconf/2...    redhat.blinux.g...    suse.db2/2003-0...    php.phpesp/2004...    uml.devel/2003-...    gnome.labyrinth...    qnx.openqnx.dev...    boot-loaders.gr...    db.dataperfect....    audio.audacity....    linux.uclinux.m...    editors.j.devel...    os.openbsd.tech...    kde.users.multi...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation