[rancid] Re: CVS Command Not Found When Using SVN

Peter Serwe peter.serwe at gmail.com
Tue Feb 10 21:23:51 UTC 2009


I configured rancid right out of the box, both 2.3.2a7 and a8 using
svn each time.  I've never done it using cvs.

It works perfectly.

From rancid.conf in ~rancid/etc/:

RCSSYS=svn; export RCSSYS

I have never used anything but this section of the README in the base
directory of the rancid source distribution as a guide to install
rancid:

Quick Installation Guide (an example):

1) ./configure [--prefix=<basedir>]
   By default, rancid will be installed under /usr/local/rancid (the default
   "prefix").  This can be overridden with the --prefix option.  E.g.:

	./configure --prefix=/home/rancid

   Rancid uses autoconf's "localstatedir" as the location of it's logs,
   CVS or Subversion respository, and directories where it's groups are
   placed.  The user who will run rancid (from cron, etc) will need write
   access to these directories.  By default, this is <prefix>/var, or
   /home/rancid/var following the example above.

   We realize that this is not optimal, but it follows the standards.  We
   suggest that this be altered to include the package name, like so:

	./configure --prefix=/home/rancid \
			--localstatedir=/home/rancid/var/rancid

   The user who will run rancid must have write permission in "localstatedir".

   See ./configure --help for other configure options.

2) make install

3) Modify <sysconfdir>/rancid.conf (e.g.: <basedir>/etc/rancid.conf).  The
   variable LIST_OF_GROUPS is a space delimited list of router "groups".
   E.g.:
	LIST_OF_GROUPS="backbone aggregation switches"

4) Put .cloginrc in the home directory of the user who will run rancid.
   .cloginrc must be not be readable/writable/executable by "others",
   i.e.: .cloginrc must be mode 0600 or 0640.

5) Modify .cloginrc.

   Test to make sure that you can log into every router.

   Note: the juniper user you use *must* log into a cli shell (which
   is the default on a juniper).

   See the file cloginrc.sample, located in <datadir> (<basedir>/share/rancid),
   for examples and good starting point.  Also take a look at the cloginrc
   manual page, 'man -M <basedir>/man cloginrc'.

6) Modify /etc/aliases
   Rancid sends the diffs and other administrative emails to rancid-<GROUP>
   and problems to rancid-admin-<GROUP>, where <GROUP> is the "GROUP" of
   routers.  This way you can separate your backbone routers from your
   access routers or separate based upon network etc...  Different router
   uses forced different people being interested in router "groups" -
   thus this setup.  Make sure email to rancid-<GROUP> works.  /etc/aliases
   can be maintainable by Majordomo stuff, but make sure the user that
   runs rancid can post to the list.

   The Precedence header set to bulk or junk *hopefully* avoids replies from
   auto-responders and vacation type mail filters.

   The --enable-mail-plus option to configure will set each of the "rancid-"
   addresses mentioned above to "rancid+".  See sendmail's operation manual
   for more information on handling of '+'.

   The --enable-adminmail-plus configure option will set each of the
   "rancid-admin-" addresses mentioned above to "rancid-admin+".  If this
   option is not used, the value of --enable-mail-plus is assumed.  That is,
   the addresses will be "rancid+", if it is specified.

7) Run rancid-cvs.
   This creates all of the necessary directories and config files for
   each of the groups in LIST_OF_GROUPS and imports them into CVS (or
   Subversion).  This will also be run each time a new group is added.  Do
   not create the directories or CVS repository manually, allow rancid-cvs
   do it.  Also see 'man -M <basedir>/man rancid-cvs'.

8) For each "group", modify the router.db file in the group directory.
   The file is of the form "router:mfg:state" where "router" is
   the name (we use FQDN) of the router, mfg is the manufacturer
   from the set of (cat5|cisco|juniper) (see router.db.5 for a complete
   list and description), and "state" is either up or down.  Each router
   listed as "up" will have the configuration grabbed.  Note: manufacturer
   cat5 is intended only for cisco catalyst switches running catalyst (not
   IOS) code.

   e.g.: <localstatedir>/<group>/router.db:
	cisco-router.domain.com:cisco:up
	adc-mux.domain.com:ezt3:up
	foundry-switch-router.domain.com:foundry:up
	juniper-router.domain.com:juniper:up
	redback-dsl-router.domain.com:redback:down
	extreme-switch.domain.com:extreme:down

9) For first-time users or new installations, run bin/rancid-run (with no
   arguments) and check the resulting log file(s) (in logs/*) for errors.
   Repeat until there are no errors.

Of note, might be the section where it mentions using rancid with svn
requiring a special configure option:

svn		Code revision system, an alternative to cvs.  Available from
		http://subversion.tigris.org/tarballs/.  Use the configure
		option --enable-svn to configure for Subversion.


And lastly, is svn actually installed on your system and available
from the $PATH?

Peter


On Tue, Feb 10, 2009 at 12:40 PM, john heasley <heas at shrubbery.net> wrote:
> Tue, Feb 10, 2009 at 10:49:53AM -0000, Mick Burke:
>> Hi all,
>>
>> I am trying to configure RANCID to work properly. My company uses an SVN server, and I found a patch that is supposed to get RANCID to work with an SVN server. The patch was made by Karsten Heymann, and I found it here: http://www.shrubbery.net/pipermail/rancid-discuss/2008-December/003489.html
>>
>> I?ve installed this patch, and RANCID does work to a point. When I run the bin/rancid-cvs command, it creates a log file in var/logs, and this is the contents of all the log files it has created:
>>
>> ------------------------------------------------------------------------------------------------------------------------
>>
>> starting: Mon Feb 9 07:01:01 GMT 2009
>>
>> /usr/local/rancid/bin/control_rancid: line 353: cvs: command not found
>>
>> ending: Mon Feb 9 07:01:02 GMT 2009
>>
>> ------------------------------------------------------------------------------------------------------------------------
>>
>> I have also declared RCSSYS environment variable as SVN, and SVN is working on the server RANCID is installed on. I have looked all over Google and I haven?t managed to find an answer to this question. Could someone please help me out?
>
> and what version of rancid are you using?
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
>



-- 
ピーター


More information about the Rancid-discuss mailing list