[OpenAFS-devel] Ubik initialization

Tommie Gannert d00-tga@d.kth.se
Wed, 29 Nov 2006 14:17:06 +0100


Hi All!

I'm having a bit of a problem using Ubik in a project of my own...

The test-program looks like

   ubik_ParserServerList(argc, argv, &myHost, otherHosts)
   ubik_ServerInit(myHost, htons(1032), otherHosts, "/tmp/testdb", &db)
   rx_StartServer(0)
   sleep(10)
   ubik_BeginTrans(db, UBIK_WRITETRANS, &trans)
   ubik_Truncate(trans, 3 * 4096)
   ubik_EndTrans(trans);

However, ubik_BeginTrans fails with UNOQUORUM if rx_StartServer(donateMe)
has donateMe == 0. If it's 1, then the program halts (of course), but the recovery
thread is running and reporting state 17. Nothing is reported when donateMe == 0.
So, apparently, the threads are not running when donateMe == 0. For the test program,
I would like to keep running a sequential test-bed after StartServer.

Replacing rx_StartServer(1) with

   rx_StartServer(0)
   rx_ServerProc()

also gets the recovery thread running.

Is there any solution to this?
Running on Linux 2.6 / GCC 4.1 / GLIBC with NPTL / OpenAFS 1.4.1.

/Tommie Gannert