[rancid] Rancid and Git

heasley heas at shrubbery.net
Wed May 21 18:55:44 UTC 2014


Mon, May 19, 2014 at 11:16:37AM -0700, james machado:
> there was a message about git and locks back in 2007
> http://www.shrubbery.net/pipermail/rancid-discuss/2007-March/002154.html
> that talked about this or something related to this.
> 
> best i can remember from past research on using git and rancid.

Thanks for that.

----
> 	$BASEDIR is the dir into which all groups go. If you put a generic
> lockfile here you will make it so multiple groups can't be polled at one
> time. Typically a temp dir is used where the file includes the group name
> so there is no stepping on of toes, and stale lockfiles aren't left in
> unexpected places.

The locks shouldn't slow down polling, the lock is only held when making
commits to the Git repository which shouldn't happen during polling
(unless I'm misunderstanding something about the code).  I needed the
locks because I need to run a series of git commands atomically or
changes from other groups might become part of the wrong commit.
----

That seems out of scope to me.  Perhaps i do not yet understand the process
in git.  how would the commits in one group become part of another group's
commit?  the commit occurs in the group's directory.


> james
> 
> On Fri, May 16, 2014 at 6:37 PM, heasley <heas at shrubbery.net> wrote:
> > trying to integrate, test and sanitize the git patch; does anyone know the
> > significance of the flock in control_rancid around commits:
> >
> > +           git )
> > +               (
> > +                   flock -x 200
> > +                   git add $router
> > +                   git commit -m "$message"
> > +               ) 200>$BASEDIR/.lockfile
> >
> > git must do its own locking, and rancid does its own per-group.  so,
> > paranoia or some special git thing?
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss


More information about the Rancid-discuss mailing list