[OpenAFS] Storing a CVS repository on AFS

Steven N. Hirsch shirsch@adelphia.net
Fri, 2 Aug 2002 18:08:55 -0400 (EDT)


On Thu, 1 Aug 2002, Emil Ochotta wrote:

> Hi All,
> 
> I'm new to AFS, so I'm looking primarily for advice / direction / tales
> of woe.
> 
> Background:
> 
> I'm hoping to use AFS to improve read-times from a CVS repository.  We
> currently have the repository set up at one location and access it
> through a server via the CVS pserver (it's own TCP/IP client-server
> stuff).
> 
> We have a bunch of sites worldwide all speaking directly to the one
> server.
> 
> I'm hoping to set up additional servers at the remote locations to
> improve local access times to the CVS data.
> 
> At first blush, it seems like the simplest solution (it terms of
> changing what we do) would be to have the CVS repository data live in an
> AFS directory and have all CVS servers access it with the same file
> path.
> 
> So, all the CVS servers except one would be AFS clients. The CVS
> repository data would be in the AFS cache of each CVS server.  A write
> to one server would invalidate the cached copies of all CVS servers, but
> read operations that hit the cache would be entirely local.
> 
> Questions:
> 
> 1. Anyone out there tried something like this?  If so, what works or
> doesn't?

We have a setup like this at work, although the vast majority of users 
point CVS directly at the AFS repository.  I run a restricted access CVS 
pserver on my workstation as well, but this is primarily for my use when 
working from home over a VPN connection.  You need to deal with the issue 
of tokens at each CVS server.  There's a (Transarc?) utility called 
'reauth' which goes daemon and refreshes my token every x hours.  I run 
this in a pagsh alongside a CVS process that's been patched to also run in 
the background (instead of being called from tcpd.)  

> 
> 2. Is there a concurrency race condition lurking in here?  CVS manages
> concurrency by creating a lock directory.  Is this operation synchronous
> on AFS such that a successful mkdir at any AFS client will guarantee no
> other AFS client could create the same directory.

As far as interaction with the repository is concerned, I don't believe
that a CVS pserver is any different from a "direct" user.  We have many
dozens of folks banging away on our repository for 5+ years and have never
had a single problem of this sort.

(disclaimer: Past performance is no guarantee of future... Well, you get 
the idea.  If it breaks for you, don't tell anyone I gave you the idea.)

Steve