vlserver: Add VL_DBBAD error code 83/13383/4
authorAndrew Deason <adeason@sinenomine.net>
Mon, 12 Nov 2018 20:41:44 +0000 (14:41 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 2 Nov 2020 16:53:22 +0000 (11:53 -0500)
The VL_ error table currently doesn't have an error code to indicate
that an operation cannot succeed because the database is corrupted.
There are a few error codes for specific cases of errors that are
probably the result of corruption (like VL_IDALREADYHASHED, or
VL_EMPTY), but these are only for specific cases and indicate rather
low-level internal problems.

There are some instances where the real problem preventing an
operation from succeeding is that the database is just corrupt or
inconsistent in some way, and the administrator must repair the
database before it can succeed. And we currently don't have any way of
indicating that situation via an error code.

So, introduce the VL_DBBAD code, to indicate this situation. Error
codes already exist in other tables for similar situations, such as
PRDBBAD, and KADATABASEINCONSISTENT.

This commit does not use the new error code anywhere; we just
introduce it into the VL_ error table, so comerr-using applications
will be able to interpret it.

Note that the VL_DBBAD error code has been recognized by the AFS
Assigned Numbers Registry as recorded in the ticket history of
<https://rt.central.org/rt/Ticket/Display.html?id=134817>

Change-Id: I8fea356a4e0db907ec8418efe6ef35d547be0a63
Reviewed-on: https://gerrit.openafs.org/13383
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/vlserver/vl_errors.et

index c6557da..3527634 100644 (file)
@@ -43,4 +43,5 @@ error_table VL
   ec VL_INDEXERANGE, "Index out of range"
   ec VL_MULTIPADDR, "Servers have the same ip address"
   ec VL_BADMASK, "Illegal attribute mask value"
+  ec VL_DBBAD, "Database is inconsistent"
 end