a79a12ade8a05196d618380bf344f225de0d9206
galt
  Fri Nov 8 13:25:51 2013 -0800
fixes #11651. Accidentally failover was looking for backupcentral.database instead of backupcentral.db which is what all of our configurations have been using.  Wow! Busted since 2009.
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 84801a6..4c5817c 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -638,31 +638,31 @@
 /* create the central database cache, trying to connect to the
  * database and failing over if needed */
 {
 char *centralProfile = "central";
 centralDb = cfgOption2(centralProfile, "db");
 centralCc = sqlConnCacheNewProfile(centralProfile);
 sqlSetParanoid(TRUE);
 struct sqlConnection *conn = sqlConnCacheMayAlloc(centralCc, centralDb);
 if ((conn == NULL) || !cartTablesOk(conn))
     {
     fprintf(stderr, "ASH: hConnectCentral failed over to backupcentral!  "
             "pid=%ld\n", (long)getpid());
     sqlConnCacheDealloc(centralCc, &conn);
     sqlConnCacheFree(&centralCc);
     centralProfile = "backupcentral";
-    centralDb = cfgOption2(centralProfile, "database");
+    centralDb = cfgOption2(centralProfile, "db");
     centralCc = sqlConnCacheNewProfile(centralProfile);
     conn = sqlConnCacheAlloc(centralCc, centralDb);
     if (!cartTablesOk(conn))
         errAbort("Cannot access cart tables in central (nor backupcentral) "
                  "database.  Please check central and backupcentral "
                  "settings in the hg.conf file and the databases they "
                  "specify.");
     }
 /* now that a profile has been determined, make sure this database goes
  * through that profile */
 sqlProfileAddDb(centralProfile, centralDb);
 sqlConnCacheDealloc(centralCc, &conn);
 sqlSetParanoid(FALSE);
 }