Discussion:
[rancid] IOS interfaces (show controllers) reappear after rancid upgrade
Marki
2015-08-05 11:38:27 UTC
Permalink
Hi,

I noticed a thing going from Rancid 2.3 to 3.2.

For ISDN PRIs rancid checks in a change every time a connection is up when
rancid is checking:

!Interface: Serial0/0/0:27, HDLC32

In fact, I checked our old repos and there were no more "!Interface" lines
at all since 2011. That must have been the time when we upgraded to 2.3.
(Bug or feature?)

It seems to be getting this from "show controllers":

...
Interface Serial0/0/0:15
Hardware is HDLC32
...

I have tried to compare bin/rancid in 2.3 and lib/rancid/ios.pm in 3.2 and I
fail to see why this seems to work differently. Anyone have an idea?

(Note: In this case the control channel Serial0/0/0:15, HDLC32 is always there.)


Bye,

Marki
Alan McKinnon
2015-08-05 12:07:17 UTC
Permalink
Post by Marki
Hi,
I noticed a thing going from Rancid 2.3 to 3.2.
For ISDN PRIs rancid checks in a change every time a connection is up when
!Interface: Serial0/0/0:27, HDLC32
In fact, I checked our old repos and there were no more "!Interface" lines
at all since 2011. That must have been the time when we upgraded to 2.3.
(Bug or feature?)
...
Interface Serial0/0/0:15
Hardware is HDLC32
...
I have tried to compare bin/rancid in 2.3 and lib/rancid/ios.pm in 3.2 and I
fail to see why this seems to work differently. Anyone have an idea?
(Note: In this case the control channel Serial0/0/0:15, HDLC32 is always there.)
What 2.3 version were you running?

2.3.8 should be doing the same as 3.2, here is the 2.3.8 code that does it:

# This routine parses "show controllers"
sub ShowContAll {

# ...

while (<INPUT>) {
if (/^Interface ([^ \n(]*)/) { $INT = "$1, "; next; }
# ...
/^Hardware is (.*)/ &&
ProcessHistory("INT","","","!Interface: $INT$1\n") && next;

# ...



Possibly you were running a 2.3 that did not have that code?
--
Alan McKinnon
***@gmail.com
Marki
2015-08-05 12:45:22 UTC
Permalink
Post by Alan McKinnon
What 2.3 version were you running?
Hmm, it was 2.3.6 I believe. Doesn't matter, ok, so it's there now/again,
and we have to deal with it.

Can we add something to get rid of the PRI interfaces (up/down on-demand)?

I have included this now in our rancid:

# Remove dynamic PRI interfaces
if (/^Hardware is HDLC32/) {
if ($INT =~ /Serial[\d\/]+\d:(\d+), /) {
$1!=15 && next;
}
}

right before the part above. Seems to work for me.
Feel free to use/include the snippet.
Alan McKinnon
2015-08-05 13:01:18 UTC
Permalink
Post by Marki
Post by Alan McKinnon
What 2.3 version were you running?
Hmm, it was 2.3.6 I believe. Doesn't matter, ok, so it's there now/again,
and we have to deal with it.
Can we add something to get rid of the PRI interfaces (up/down on-demand)?
# Remove dynamic PRI interfaces
if (/^Hardware is HDLC32/) {
if ($INT =~ /Serial[\d\/]+\d:(\d+), /) {
$1!=15 && next;
}
}
right before the part above. Seems to work for me.
Feel free to use/include the snippet.
That will work :-)

Foe heasley to add this to upstream, you might want to reply and expound
a little on how IOS lists these dynamic PRIs, with some output snippets.

This is so it will work best for the general case.
--
Alan McKinnon
***@gmail.com
heasley
2015-08-12 16:18:27 UTC
Permalink
Post by Alan McKinnon
Post by Marki
Post by Alan McKinnon
What 2.3 version were you running?
Hmm, it was 2.3.6 I believe. Doesn't matter, ok, so it's there now/again,
and we have to deal with it.
Can we add something to get rid of the PRI interfaces (up/down on-demand)?
# Remove dynamic PRI interfaces
if (/^Hardware is HDLC32/) {
if ($INT =~ /Serial[\d\/]+\d:(\d+), /) {
$1!=15 && next;
}
}
right before the part above. Seems to work for me.
Feel free to use/include the snippet.
That will work :-)
Foe heasley to add this to upstream, you might want to reply and expound
a little on how IOS lists these dynamic PRIs, with some output snippets.
More output context would help; esp. if there is something in the o/p of
that show command that will indicate that it is a dynamic interface.
Post by Alan McKinnon
This is so it will work best for the general case.
--
Alan McKinnon
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...