Landon Orr | 29 Jul 01:04 2014

[rancid] Flogin hanging after login

Currently I'm trying to get rancid working for a Brocade ICX6610 switch. However, whenever I run flogin with any command, it successfully connects, hangs and then times out. In my router.db file I have brocadeip:foundry:up. If I run flogin -c "show version" brocadeip, it connects successfully and then just hangs. However, if I run it with clogin, it actually runs the command successfully. I've run flogin with the -d flag, however I don't see any log entries about trying to send the actual commands. Any idea what I could be doing wrong here?

--
Landon Orr
Qualtrics
Site Reliability Engineer

Phone: 801-709-2169
E-mail: landono <at> qualtrics.com | Website: qualtrics.com

Connect with us via FacebookTwitter, or our Q-munity Blog
Sophisticated research made simple.™
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Aaron Wasserott | 24 Jul 14:22 2014

[rancid] Ignore differences in certain lines?

Trying to capture ‘show interface status’ output from Cisco IOS switches, but ignore the output for diff purposes. Is that possible? I guess it would have to be part of the mailer function to not send output for certain lines.

 

I copied the ShowVLAN sub-routine because it already appends ! in front of the lines, so they are not considered config lines. But right now I can’t even get the output captured.

 

This is the new sub I am using:

 

 

# This routine parses "show interface status"

sub ShowIntStat {

    print STDERR "    In ShowIntStat: $_" if ($debug);

 

    #($_ = <INPUT>, return(1)) if (!$DO_SHOW_INT_STAT);

 

    while (<INPUT>) {

        tr/\015//d;

        last if (/^$prompt/);

        next if (/^(\s*|\s*$cmd\s*)$/);

        return(1) if /^\s*\^\s*$/;

        return(1) if /Line has invalid autocommand /;

        return(1) if /(Invalid input detected|Type help or )/;

        return(1) if /Ambiguous command/i;

        # newer releases (~12.1(9)) place the vlan config in the normal

        # configuration (write term).

        #return(1) if ($type =~ /^(3550|4500)$/);

        #return(1) if ($type !~ /^(2900XL|3500XL|6000)$/);

        return(-1) if (/command authorization failed/i);

        # the pager can not be disabled per-session on the PIX

        if (/^(<-+ More -+>)/) {

            my($len) = length($1);

            s/^$1\s{$len}//;

        }

 

        ProcessHistory("COMMENTS","keysort","IO","!INT: $_");

    }

    ProcessHistory("COMMENTS","keysort","IO","!\n");

    return(0);

}

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
John Kougoulos | 23 Jul 22:52 2014
Picon

[rancid] F5 rancid

Hi all,

just in case someone is interested, I faced recently this issue that f5rancid cannot receive the output of some tmsh commands in 11.4 when ran through cron. I didn't find any solutions in the mailing list archives, so, after wasting some time trying various tricks, I ended up that the easiest solution is to change this line in f5rancid:
$ENV{'TERM'} = "vt100";

to

$ENV{'TERM'} = "vt100-w";

The problem was that when the prompt+command was over 80 columns, rancid was confused with the escape characters.
Hope it helps someone

John
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Mark Tinka | 23 Jul 17:02 2014
Picon

[rancid] Ignoring (Boot)Flash Changes (IOS and IOS XE)

Hi all.

I've been checking around and can't seem to find any current 
solutionsk (most of the ones relate to earlier versions of 
RANCID, and there have been some changes to the "rancid" 
script since).

Would anyone know the currently accepted method to ignore 
constant RANCID updates due to (Boot)flash changes on IOS 
and IOS XE systems? Thanks.

Mark
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
heasley | 18 Jul 22:33 2014
Picon

Re: [rancid] Rancid and Git

Wed, May 21, 2014 at 08:07:26PM +0000, Brown, David M JR:
> 
> >----
> >> 	$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.
> 
> One of the big differences between svn commit and git commit is the
> current working directory doesn¹t matter for git and it does for svn. My
> guess is that they did this then to ensure that commits to on group don¹t
> have race conditions with another group being modified.
> 
> A fix to this would be to do a 'git commit -m ³$message² *' this should
> only commit things in the current working directory and not differences in
> the entire tree.
> 
> Hopefully this helps.
> 
> Thanks,
> - David Brown

I've been playing with git a bit to determine how to arrange the repository
and understand the commands.  I find the automatic search for changed files
unwelcome.

The original git patch arranges the repository at $BASEDIR (eg: /var/rancid),
which creates a single repository with all groups.

I experimented with creating a "remote" repository in $BASEDIR, then pushing
individual groups to it, but they clash, which I suspect has to do with
either the repository name (git push -u origin master).

Assuming that is not the problem with that arrangement, another possibility
is just making each group its own self-contained repository.  However, I
dislike this as well, as its easier to help users recover from RCS problems
when they can just rm-rf the group and check-out a fresh copy.

Also, I'd like to maintain the existing arrangement with CVS and SVN, where
each rancid group is it's own path that admins can remove their working copy
without remove-ing from the repository (yes, I understand that the history
remains).

Any guidance or comment welcome.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss

Sambath Chhoeun | 8 Jul 03:38 2014
Picon

[rancid] perl scripting for BGP prefix monitoring/backup

Dear Everyone,

I am now looking for way to monitoring and backup the BGP prefix from Cisco/Juniper devices, and I am thinking if we could have a perl scripting to patch into the rancid and get it do the backup. Anyone experience with that? Much Appreciate with your help. 

Regards, 
Sambath
--
Sambath CHHOEUN 
Networks Support
Tel: (855) 77 900110/ 70 7887 62

 
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Daniel Jacobs | 8 Jul 00:41 2014

Re: [rancid] Rancid 3.1, router.db using ; instead of :, device_type is empty

Adam, from 3.0 on, router.db uses ; instead of : so that IPv6 addresses will work (at least that was my understanding).

Daniel


On Mon, Jul 7, 2014 at 4:40 PM, Adam Korab <adam <at> ballinatta.com> wrote:
Use colons instead of semicolons in router.db

On Jul 7, 2014, at 5:18 PM, "Daniel Jacobs" <daniel.jacobs <at> doortodoororganics.com> wrote:

I just installed rancid 3.1 from source on a Centos 6.5 machine. I'm trying to get the configs for our Adtran routers, so I figured I'd use the adtran definition from rancid.types.base, but I've also tried this with cisco in place of adtran in router.db and got the same results.

Here is my router.db:


output:

$ /usr/local/rancid/bin/rancid /usr/local/rancid/bin/rancid-run
loadtype(): device_type is empty
Couldn't load device type spec for

It works if I do this:
$ rancid -t cisco 10.4.0.1

And if I try this:
$ rancid -t adtran 10.4.0.1
I get this as output:
inloop is not configured for device type adtran at /usr/local/rancid/bin/rancid line 121.

Since I've already made sure I'm using semicolons instead of colons, what am I missing?

Thanks!

Daniel


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss



--
Daniel Jacobs    
Senior IT Admin    
\|/ \|/ \|/ \|/ \|/ \|/ \|/ \|/ \|/ \|/ \|/ \|/
"""""""""""""""""""""""""""""""""""""""""""""
door to door organics
w. 303.620.5440
"""""""""""""""""""""""""""""""""""""""""""""
delightfully fresh
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Daniel Jacobs | 7 Jul 21:45 2014

[rancid] Rancid 3.1, router.db using ; instead of :, device_type is empty

I just installed rancid 3.1 from source on a Centos 6.5 machine. I'm trying to get the configs for our Adtran routers, so I figured I'd use the adtran definition from rancid.types.base, but I've also tried this with cisco in place of adtran in router.db and got the same results.

Here is my router.db:


output:

$ /usr/local/rancid/bin/rancid /usr/local/rancid/bin/rancid-run
loadtype(): device_type is empty
Couldn't load device type spec for

It works if I do this:
$ rancid -t cisco 10.4.0.1

And if I try this:
$ rancid -t adtran 10.4.0.1
I get this as output:
inloop is not configured for device type adtran at /usr/local/rancid/bin/rancid line 121.

Since I've already made sure I'm using semicolons instead of colons, what am I missing?

Thanks!

Daniel


_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Andrei Sabau | 7 Jul 13:52 2014
Picon

[rancid] Need help upgrading rancid from 2.7.2 to 3.0

Hello.

I would like to upgrade the rancid on a machine, is there a method to do this without losing the CVS repositories?

Should i just install the new rancid with the same installation prefix as the old one?

Thank you.
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Dave Ewart | 4 Jul 10:44 2014
Picon
Picon

[rancid] Best way to avoid regular diffs?

Hello,

I've been getting repeated diffs in my Rancid reports because our
switches use dynamic VLANs.  Bascially, the output from 'show vlan' is
constantly varying and there is no need to capture it: its results are
simply noise, for our purposes.

So I've been wondering about the *correct* way to prevent that output
hitting the diffs.

I've done the following:

- Copied /usr/lib/rancid/bin/rancid to a new file named
  /usr/lib/rancid/bin/rancid-custom

- Modified router.db so that it refers to 'cisco-custom' instead of
  'cisco'

- Modified /usr/lib/rancid/bin/rancid-fe to add an extra link from
  'cisco-custom' to 'rancid-custom'

- Then edit /usr/lib/rancid/bin/rancid-custom to remove the 'show vlan'
  output.

This works and does what I want, so far so good.

This seems like a robust solution, but because I've modified stock
files, I'm going to miss out on any updates to the rancid installation
that the Debian packages bring, next time there's an update.

Is my approach reasonable or can you suggest a better, more robust
approach?

Cheers,

Dave.

--

-- 
Dave Ewart
davee <at> ceu.ox.ac.uk
Computing Manager, Cancer Epidemiology Unit
University of Oxford
N 51.7516, W 1.2152
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
heasley | 3 Jul 18:17 2014
Picon

Re: [rancid] Trouble grabbing configs from a Foundry FesX

Thu, Jul 03, 2014 at 09:14:32AM -0700, Scott Baker:
> On 07/03/2014 09:11 AM, heasley wrote:
> > it should be fine; is it auto-enabling but you dont have autoenable set in
> > cloginrc?  or try flogin with -autoenable.  else show me flogin -d host o/p.
> 
> Aha that was it... if I pass flogin -autoenable it works fine. I've
> never had to specify this for my other hosts. Other hosts are Cisco, so
> maybe that's the difference?

clogin has morphed to try to be more accomodating to the enable/autoenable
thing.  we'd like to eventually remove that altogether, eventually.

> How do I specify that in my .cloginrc?

see cloginrc(5) manpage
_______________________________________________
Rancid-discuss mailing list
Rancid-discuss <at> shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


Gmane