Discussion:
[rancid] [PATCH]: Improved IOS XE detection in rancid
Alan McKinnon
2014-04-25 07:00:20 UTC
Permalink
Cisco appear to have changed the IOS-XE stamp in "show version" for some
images. This causes the XE detection in ShowVersion() to fail, causing
the filtering for tracelog in DirSlotN() to not be applied.

One-line patch below. The strings are subtlety different, it seemed
easier to add a new regex rather than adapt the existing one.

Sample version output:

#show ver
Cisco IOS XE Software, Version 03.10.02.S - Extended Support Release
Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M),
Version 15.3(3)S2, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.


Diff:

--- rancid.old 2014-04-25 08:51:36.000000000 +0200
+++ rancid 2014-04-25 08:53:34.000000000 +0200
@@ -196,6 +196,7 @@
next;
}
if (/cisco ios .* IOS-XE/i) { $ios = "XE"; }
+ if (/cisco IOS XE software/i) { $ios = "XE"; }
if (/^Application and Content Networking .*Software/) { $type =
"CE"; }
# treat the ACE like the Content Engines for matching endofconfig
if (/^Cisco Application Control Software/) { $type = "CE"; }
--
Alan McKinnon
***@gmail.com
heasley
2014-04-25 07:06:29 UTC
Permalink
Post by Alan McKinnon
Cisco appear to have changed the IOS-XE stamp in "show version" for some
images. This causes the XE detection in ShowVersion() to fail, causing
the filtering for tracelog in DirSlotN() to not be applied.
One-line patch below. The strings are subtlety different, it seemed
easier to add a new regex rather than adapt the existing one.
#show ver
Cisco IOS XE Software, Version 03.10.02.S - Extended Support Release
Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M),
Version 15.3(3)S2, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.
--- rancid.old 2014-04-25 08:51:36.000000000 +0200
+++ rancid 2014-04-25 08:53:34.000000000 +0200
@@ -196,6 +196,7 @@
next;
}
if (/cisco ios .* IOS-XE/i) { $ios = "XE"; }
+ if (/cisco IOS XE software/i) { $ios = "XE"; }
in 3.0:
if (/cisco ios.*(IOS-)?XE/i) { $ios = "XE"; }
Post by Alan McKinnon
if (/^Application and Content Networking .*Software/) { $type =
"CE"; }
# treat the ACE like the Content Engines for matching endofconfig
if (/^Cisco Application Control Software/) { $type = "CE"; }
--
Alan McKinnon
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Alan McKinnon
2014-04-25 07:19:46 UTC
Permalink
Post by heasley
Post by Alan McKinnon
Cisco appear to have changed the IOS-XE stamp in "show version" for some
images. This causes the XE detection in ShowVersion() to fail, causing
the filtering for tracelog in DirSlotN() to not be applied.
One-line patch below. The strings are subtlety different, it seemed
easier to add a new regex rather than adapt the existing one.
#show ver
Cisco IOS XE Software, Version 03.10.02.S - Extended Support Release
Cisco IOS Software, ASR1000 Software (X86_64_LINUX_IOSD-UNIVERSALK9-M),
Version 15.3(3)S2, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2014 by Cisco Systems, Inc.
--- rancid.old 2014-04-25 08:51:36.000000000 +0200
+++ rancid 2014-04-25 08:53:34.000000000 +0200
@@ -196,6 +196,7 @@
next;
}
if (/cisco ios .* IOS-XE/i) { $ios = "XE"; }
+ if (/cisco IOS XE software/i) { $ios = "XE"; }
if (/cisco ios.*(IOS-)?XE/i) { $ios = "XE"; }
Post by Alan McKinnon
if (/^Application and Content Networking .*Software/) { $type =
"CE"; }
# treat the ACE like the Content Engines for matching endofconfig
if (/^Cisco Application Control Software/) { $type = "CE"; }
Thanks. I forgot to mention my original patch applies to 2.3.8
--
Alan McKinnon
***@gmail.com
Loading...