[OpenAFS-devel] waiting for quorum election

Jeffrey Hutzelman jhutz@cmu.edu
Mon, 7 Jan 2002 18:56:18 -0500 (EST)


On Fri, 4 Jan 2002, Jeremy Stribling wrote:

> Hi all,
> 
> I am working on an automatic configuration script for AFS on Linux.
> Because it's a script and everything happens so fast, a problem sometimes
> occurs where I try to create a volume using vos before a quorum has been
> elected.  I have tried creating a script that parses the output of the
> udebug program to make sure it contains a line starting with "I am sync
> site" before going on to execute any volume creation commands, however even
> when the output contains this line I still sometimes get the error.  I
> tried running udebug on all four ports (buserver, kaserver, ptserver, and
> vlserver), and the same problem always occurs.  Here is the error I get:
> 
> >vos create <some_machine_name> /vicepa root.cell
> Could not get Id for volume root.cell
> u: no quorum elected
> Error in vos create command
> u: no quorum elected
> 
> Does anyone know of any other way to ensure a quorum has been elected,
> short of simply waiting 5 or 10 seconds just to be sure?  I'd really prefer
> a nice solution.  Thanks,

You may need to wait more than 5 or 10 seconds, depending on the
situation.  In any case, the simple thing to do is write a program that
calls VOTE_GetSyncSite until it gets an answer.