Hello,
We have to change our DB server's IP addresses. During the changing IP
process, We'd like to force some of the DB servers to be clone only.
We put the [] in the /usr/afs/etc/CellServDB. The ptserver and vlserver
work as expected. The one with the lower IP address thinks itself is a
clone only for the ptserver and vlserver, but the buserver does not pay
attention to the [] inside the /usr/afs/etc/CellServDB, the one with the
lower ip address still thinks itself is the sync site.
After studying the source code, we changed the source code to make the
buserver to honor the square brakets in the /usr/afs/etc/CellServDB.
Would you please take a look at the attachment and let us know if this is
OK ? We did some test on this, it looks OK to us now.
Thanks in advance!
*=======================================*
* Lynn Zhang *
* LS&A System Services Team *
* [EMAIL PROTECTED] *
*=======================================*
diff -ur one/openafs-1.2.10/src/budb/server.c two/openafs-1.2.10/src/budb/server.c
--- one/openafs-1.2.10/src/budb/server.c Sun Apr 21 00:14:53 2002
+++ two/openafs-1.2.10/src/budb/server.c Thu Feb 12 13:23:54 2004
@@ -303,6 +303,10 @@
time_t currentTime;
afs_int32 code = 0;
+ char clones[MAXHOSTSPERCELL];
+
+
+
struct rx_service *tservice;
struct rx_securityClass *sca[3];
@@ -422,7 +426,8 @@
LogDebug(1, "Using server list from %s cell database.\n", lcell);
- code = afsconf_GetCellInfo (BU_conf, lcell, 0, &cellinfo);
+code = afsconf_GetExtendedCellInfo (BU_conf, lcell, 0, &cellinfo, &clones);
+
code = convert_cell_to_ubik (&cellinfo,
&globalConfPtr->myHost,
globalConfPtr->serverList);
@@ -453,9 +458,10 @@
rx_SetRxDeadTime(60); /* 60 seconds inactive before timeout */
- code = ubik_ServerInit(globalConfPtr->myHost,
+ code = ubik_ServerInitByInfo (globalConfPtr->myHost,
htons(AFSCONF_BUDBPORT),
- globalConfPtr->serverList,
+ &cellinfo,
+ &clones,
dbNamePtr, /* name prefix */
&BU_dbase);
if (code)