arla 0.21 Oops on Linux 2.2.1

Love lha at stacken.kth.se
Fri Feb 5 08:27:08 CET 1999


Chuck Lever <cel at monkey.org> writes:

> with earlier releases, i would also get a warning, but things worked after
> that.  is there a way to decode 4294966841, or is this a sign of error
> code value mismatches between our AFS servers and arla?

The error code is not 4294966841 but rather (the same) -455 (I get this on
my i386-fbsd-current, but my sparc-NetBSD does same the same thing). And
that is the RXGEN_OPCODE that rxgen generated code returns when the opcode
is out of range.

I added rxgen errorcodes to lib/ko/koerror.c.

In 0.21 we use GetEntryByNameN that is a newer interface then
GetEntryByName. Babble.citi.umich.edu doesn't seams to understand
GetEntryByNameN.

Try the patch below.

Love

Index: arla_local.h
===================================================================
RCS file: /usr/local/cvsroot/arla/arlad/arla_local.h,v
retrieving revision 1.41
diff -u -w -r1.41 arla_local.h
--- arla_local.h	1998/12/13 16:50:06	1.41
+++ arla_local.h	1999/02/05 07:21:39
@@ -89,6 +89,7 @@
 
 #include <rx/rx.h>
 #include <rx/rx_null.h>
+#include <rx/rxgencon.h>
 
 #ifdef KERBEROS
 #include <des.h>
Index: conn.c
===================================================================
RCS file: /usr/local/cvsroot/arla/arlad/conn.c,v
retrieving revision 1.48
diff -u -w -r1.48 conn.c
--- conn.c	1998/12/15 02:03:53	1.48
+++ conn.c	1999/02/05 07:21:39
@@ -363,6 +363,7 @@
     e->port          = port;
     e->service       = service;
     e->flags.alivep  = TRUE;
+    e->flags.old     = FALSE;
     e->refcount      = 0;
     e->cred          = cred;
     e->securityindex = securityindex;
Index: conn.h
===================================================================
RCS file: /usr/local/cvsroot/arla/arlad/conn.h,v
retrieving revision 1.18
diff -u -w -r1.18 conn.h
--- conn.h	1998/12/22 13:15:54	1.18
+++ conn.h	1999/02/05 07:21:39
@@ -61,6 +61,7 @@
     struct {
 	unsigned alivep : 1;
 	unsigned killme : 1;
+	unsigned old : 1;
     } flags;
     unsigned refcount;
     Listitem *probe_le;
Index: volcache.c
===================================================================
RCS file: /usr/local/cvsroot/arla/arlad/volcache.c,v
retrieving revision 1.58
diff -u -w -r1.58 volcache.c
--- volcache.c	1998/12/31 14:25:16	1.58
+++ volcache.c	1999/02/05 07:21:39
@@ -421,6 +421,30 @@
 }
 
 /*
+ * Convert old style vldbentry `old` to newer vldbNentry style `new'
+ */
+
+void
+vldb2vldbN (vldbentry *old, nvldbentry *new)
+{
+    int i;
+
+    strncpy (new->name, old->name, VLDB_MAXNAMELEN);
+    new->name[VLDB_MAXNAMELEN-1] = '\0';
+    new->nServers = old->nServers;
+    
+    for (i = 0; i < old->nServers ; i++) {
+	new->serverNumber[i] = old->serverNumber[i];
+	new->serverPartition[i] = old->serverPartition[i];
+	new->serverFlags[i] = old->serverFlags[i];
+    }
+    for (i = 0; i < MAXTYPES ; i++)
+	new->volumeId[i] = old->volumeId[i];
+    new->cloneId = old->cloneId;
+    new->flags = old->flags;
+}
+
+/*
  * Get all the db servers for `e->cell', sort them in order by rtt
  * (with some fuzz) and try to retrieve the entry for `name'.
  *
@@ -472,7 +496,16 @@
 
     for (i = 0; i < num_working_db_servers; ++i) {
 	if (conns[i] != NULL) {
+	retry:
 	    if (try_again) {
+		if (conns[i]->flags.old) {
+		    vldbentry entry;
+		    error = VL_GetEntryByName (conns[i]->connection,
+					       name, &entry);
+		    if (error == 0) {
+			vldb2vldbN(&entry, &e->entry);
+		    }
+		} else
 		error = VL_GetEntryByNameN (conns[i]->connection,
 					    name, &e->entry);
 		if (error == RX_CALL_DEAD)
@@ -485,9 +518,15 @@
 		    error = ENOENT;
 		    try_again = FALSE;
 		    break;
+		case RXGEN_OPCODE:
+		    conns[i]->flags.old = TRUE;
+		    goto retry;
+		    break;
 		default :
 		    arla_warn (ADEBVOLCACHE, error,
-			       "VL_GetEntryByNameN(%s)", name);
+			       "VL_GetEntryByName%s(%s)", 
+			       conns[i]->flags.old ? "" : "N",
+			       name);
 		    break;
 		}
 	    }
Index: rxgencon.h
===================================================================
RCS file: rxgencon.h
diff -N rxgencon.h
--- /dev/null	Fri Feb  5 05:15:09 1999
+++ /tmp/cvsAAAa07412	Fri Feb  5 08:22:36 1999
@@ -0,0 +1,38 @@
+/*
+****************************************************************************
+*        Copyright IBM Corporation 1988, 1989 - All Rights Reserved        *
+*                                                                          *
+* Permission to use, copy, modify, and distribute this software and its    *
+* documentation for any purpose and without fee is hereby granted,         *
+* provided that the above copyright notice appear in all copies and        *
+* that both that copyright notice and this permission notice appear in     *
+* supporting documentation, and that the name of IBM not be used in        *
+* advertising or publicity pertaining to distribution of the software      *
+* without specific, written prior permission.                              *
+*                                                                          *
+* IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL *
+* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL IBM *
+* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY      *
+* DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER  *
+* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING   *
+* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.    *
+****************************************************************************
+*/
+
+/* $Id: rxgencon.h,v 1.1 1999/02/05 06:09:06 lha Exp $ */
+
+#ifndef	_RXGEN_CONSTS_
+#define	_RXGEN_CONSTS_
+
+/* These are some rxgen-based (really arbitrary) error codes... */
+#define	RXGEN_SUCCESS	    0
+#define	RXGEN_CC_MARSHAL    -450
+#define	RXGEN_CC_UNMARSHAL  -451
+#define	RXGEN_SS_MARSHAL    -452
+#define	RXGEN_SS_UNMARSHAL  -453
+#define	RXGEN_DECODE	    -454
+#define	RXGEN_OPCODE	    -455
+#define	RXGEN_SS_XDRFREE    -456
+#define	RXGEN_CC_XDRFREE    -457
+
+#endif /* _RXGEN_CONSTS_ */







More information about the Arla-drinkers mailing list