Discussion:
[rancid] Cisco WAE (WAAS) units
James M Keller
2010-02-16 16:05:33 UTC
Permalink
I know there was some discussion in the archives about getting these
working (even basic show run, writer term, etc).

The problem is in rancid:WriteTerm sub, there is a block to compress '!'
lines to a singe line, which ends up dropping the "! End of WAAS
configuration" marker line and leaving the singe '!'. At least in the
4.x WAAS code, there are two '!' lines and then the '! End of WAAS
configuration" line.

The fix is to add an end of config check above this comment line
compression function:

# Cisco WAAS WAE units prefix End of command line with '!'

# Neet to check for end of config here before skipping comments

if (/^! End of WAAS configuration/) {

$found_end = 1;

return(0);

}

# skip consecutive comment lines to avoid oscillating extra comment

# line on some access servers. grrr.

if (/^!/) {

next if ($comment);

ProcessHistory("","","",$_);

$comment++;

next;

}


I haven't looked at the current code, this was against Debian lenny's
version.
--
---
James M Keller
James M Keller
2010-02-16 20:50:37 UTC
Permalink
Post by James M Keller
I know there was some discussion in the archives about getting these
working (even basic show run, writer term, etc).
The problem is in rancid:WriteTerm sub, there is a block to compress
'!' lines to a singe line, which ends up dropping the "! End of WAAS
configuration" marker line and leaving the singe '!'. At least in
the 4.x WAAS code, there are two '!' lines and then the '! End of WAAS
configuration" line.
The fix is to add an end of config check above this comment line
# Cisco WAAS WAE units prefix End of command line with '!'
# Neet to check for end of config here before skipping comments
if (/^! End of WAAS configuration/) {
$found_end = 1;
return(0);
}
# skip consecutive comment lines to avoid oscillating extra comment
# line on some access servers. grrr.
if (/^!/) {
next if ($comment);
ProcessHistory("","","",$_);
$comment++;
next;
}
I haven't looked at the current code, this was against Debian lenny's
version.
--
---
James M Keller
It looks like lenny is 2.3.2 code (listed as current on shrubbery.net),
so I can do diff's when I'm down adding int WAE support to the main
rancid script. Central manager configs are retrievable from CLI. At
best you could script the command to dump the database to XML on the CM
file system and then try more dbfile.xml to terminal. But the admin
guide notes it's resource intensive to do the export. At least I'm able
to grab the acceleration-engine configs and also grab WAAS specific info
as comment entries. I'm likely going to have to tweak some of it to
parse out updating data like session counters, so not ready to dump a
diff yet. Also added WCCP info as comments for both the WAEs and Cisco
IOS, as our shop is using the WCCP rather then in-line for these. If
show ip wccp returns not eabled or invalid, etc it skips it like any
other invalid command for a platform.
--
---
James M Keller
john heasley
2010-02-17 00:41:25 UTC
Permalink
Post by James M Keller
Post by James M Keller
I know there was some discussion in the archives about getting these
working (even basic show run, writer term, etc).
The problem is in rancid:WriteTerm sub, there is a block to compress
'!' lines to a singe line, which ends up dropping the "! End of WAAS
configuration" marker line and leaving the singe '!'. At least in
the 4.x WAAS code, there are two '!' lines and then the '! End of WAAS
configuration" line.
The fix is to add an end of config check above this comment line
# Cisco WAAS WAE units prefix End of command line with '!'
# Neet to check for end of config here before skipping comments
if (/^! End of WAAS configuration/) {
$found_end = 1;
return(0);
}
# skip consecutive comment lines to avoid oscillating extra comment
# line on some access servers. grrr.
if (/^!/) {
how about
if (/^!\s*$/) {
Post by James M Keller
Post by James M Keller
next if ($comment);
ProcessHistory("","","",$_);
$comment++;
next;
}
I haven't looked at the current code, this was against Debian lenny's
version.
--
---
James M Keller
It looks like lenny is 2.3.2 code (listed as current on shrubbery.net),
so I can do diff's when I'm down adding int WAE support to the main
rancid script. Central manager configs are retrievable from CLI. At
best you could script the command to dump the database to XML on the CM
file system and then try more dbfile.xml to terminal. But the admin
guide notes it's resource intensive to do the export. At least I'm able
to grab the acceleration-engine configs and also grab WAAS specific info
as comment entries. I'm likely going to have to tweak some of it to
parse out updating data like session counters, so not ready to dump a
diff yet. Also added WCCP info as comments for both the WAEs and Cisco
IOS, as our shop is using the WCCP rather then in-line for these. If
show ip wccp returns not eabled or invalid, etc it skips it like any
other invalid command for a platform.
if i understand this; i'd create a separate rancid script for this thing.
Dale Shaw
2010-02-17 00:47:56 UTC
Permalink
Hi,
Post by john heasley
how about
if (/^!\s*$/) {
My regexp-foo is poor but if that translates to 'collapse all lines
containing "!" only into a single "!"; leave lines starting with "!"
followed by <anything> alone", that sounds like the best (most
elegant) solution to me.

Cheers,
Dale
James M Keller
2010-02-17 14:49:00 UTC
Permalink
Post by john heasley
Post by James M Keller
Post by James M Keller
I know there was some discussion in the archives about getting these
working (even basic show run, writer term, etc).
The problem is in rancid:WriteTerm sub, there is a block to compress
'!' lines to a singe line, which ends up dropping the "! End of WAAS
configuration" marker line and leaving the singe '!'. At least in
the 4.x WAAS code, there are two '!' lines and then the '! End of WAAS
configuration" line.
The fix is to add an end of config check above this comment line
# Cisco WAAS WAE units prefix End of command line with '!'
# Neet to check for end of config here before skipping comments
if (/^! End of WAAS configuration/) {
$found_end = 1;
return(0);
}
# skip consecutive comment lines to avoid oscillating extra comment
# line on some access servers. grrr.
if (/^!/) {
how about
if (/^!\s*$/) {
John, probably not a bad idea. I was just leaving what was in the
2.3.2 code as is to get the WAE fetching working. The end of config
check could then be put lower down in WriteTerm along with the IOS/PIX
check or merged into that check line itself.
Post by john heasley
Post by James M Keller
Post by James M Keller
next if ($comment);
ProcessHistory("","","",$_);
$comment++;
next;
}
I haven't looked at the current code, this was against Debian lenny's
version.
--
---
James M Keller
It looks like lenny is 2.3.2 code (listed as current on shrubbery.net),
so I can do diff's when I'm down adding int WAE support to the main
rancid script. Central manager configs are retrievable from CLI. At
best you could script the command to dump the database to XML on the CM
file system and then try more dbfile.xml to terminal. But the admin
guide notes it's resource intensive to do the export. At least I'm able
to grab the acceleration-engine configs and also grab WAAS specific info
as comment entries. I'm likely going to have to tweak some of it to
parse out updating data like session counters, so not ready to dump a
diff yet. Also added WCCP info as comments for both the WAEs and Cisco
IOS, as our shop is using the WCCP rather then in-line for these. If
show ip wccp returns not eabled or invalid, etc it skips it like any
other invalid command for a platform.
if i understand this; i'd create a separate rancid script for this thing.
At least in the 4.x code branch it is at least as IOS-ish as PIX/ASAs.
I added comment captures for show ip wccp / show wccp (ios/waas) and
show cms (waas), and it's not a lot of parsing. ShowCMS will return(1)
if the type is set to WAAS (which gets set from updated ShowVersion to
include WAAS/WAE parsing).

The show wccp capture is useful for the IOS systems that have it
configured, as systems can negotiate return types other then the
preference set in the configuration. So it is handy to be able to
track the status as "! WCCP : <line>" entries in the rancid diffs if
something changes. I've had to un-scramble a 50 site WAE deployment
when someone new changed something incorrectly in the Central Manager
and broke WCCP between the IOS and WAAS WAEs due to configured vs
negotiated return types. With my local changes this can be tracked as
to what the router/switch and WAE where working under at previous
polling periods.

Some folks may also be using WCCP for web-cache, I don't have any setups
that use wccp for that, but the ShowWCCP sub could updated for that and
a show ip wccp web-cache command added that uses it (I'm actually
grabbing show ip wccp 61 and show ip wccp 62 at the moment)
--
---
James M Keller
James M Keller
2010-02-17 15:49:27 UTC
Permalink
Post by James M Keller
At least in the 4.x code branch it is at least as IOS-ish as PIX/ASAs.
I added comment captures for show ip wccp / show wccp (ios/waas) and
show cms (waas), and it's not a lot of parsing. ShowCMS will return(1)
if the type is set to WAAS (which gets set from updated ShowVersion to
include WAAS/WAE parsing).
Slight correction to myself - ShowCMS will return(1) if type != WAAS

I'll probably tweak things this week and cut a diff for anyone interested.
--
---
James M Keller
john heasley
2010-02-17 23:30:16 UTC
Permalink
Post by James M Keller
Post by john heasley
Post by James M Keller
It looks like lenny is 2.3.2 code (listed as current on shrubbery.net),
so I can do diff's when I'm down adding int WAE support to the main
rancid script. Central manager configs are retrievable from CLI. At
best you could script the command to dump the database to XML on the CM
file system and then try more dbfile.xml to terminal. But the admin
guide notes it's resource intensive to do the export. At least I'm able
to grab the acceleration-engine configs and also grab WAAS specific info
as comment entries. I'm likely going to have to tweak some of it to
parse out updating data like session counters, so not ready to dump a
diff yet. Also added WCCP info as comments for both the WAEs and Cisco
IOS, as our shop is using the WCCP rather then in-line for these. If
show ip wccp returns not eabled or invalid, etc it skips it like any
other invalid command for a platform.
if i understand this; i'd create a separate rancid script for this thing.
At least in the 4.x code branch it is at least as IOS-ish as PIX/ASAs.
and, I should have made those a separate script. contain the ugly.
Post by James M Keller
I added comment captures for show ip wccp / show wccp (ios/waas) and
show cms (waas), and it's not a lot of parsing. ShowCMS will return(1)
if the type is set to WAAS (which gets set from updated ShowVersion to
include WAAS/WAE parsing).
The show wccp capture is useful for the IOS systems that have it
configured, as systems can negotiate return types other then the
preference set in the configuration. So it is handy to be able to
track the status as "! WCCP : <line>" entries in the rancid diffs if
something changes. I've had to un-scramble a 50 site WAE deployment
when someone new changed something incorrectly in the Central Manager
and broke WCCP between the IOS and WAAS WAEs due to configured vs
negotiated return types. With my local changes this can be tracked as
to what the router/switch and WAE where working under at previous
polling periods.
so, add the wccp for ios, but it still seems the WAE device should be
a separate script.
Post by James M Keller
Some folks may also be using WCCP for web-cache, I don't have any setups
that use wccp for that, but the ShowWCCP sub could updated for that and
a show ip wccp web-cache command added that uses it (I'm actually
grabbing show ip wccp 61 and show ip wccp 62 at the moment)
--
---
James M Keller
James M Keller
2010-02-18 00:46:36 UTC
Permalink
Post by john heasley
Post by James M Keller
Post by john heasley
Post by James M Keller
It looks like lenny is 2.3.2 code (listed as current on shrubbery.net),
so I can do diff's when I'm down adding int WAE support to the main
rancid script. Central manager configs are retrievable from CLI. At
best you could script the command to dump the database to XML on the CM
file system and then try more dbfile.xml to terminal. But the admin
guide notes it's resource intensive to do the export. At least I'm able
to grab the acceleration-engine configs and also grab WAAS specific info
as comment entries. I'm likely going to have to tweak some of it to
parse out updating data like session counters, so not ready to dump a
diff yet. Also added WCCP info as comments for both the WAEs and Cisco
IOS, as our shop is using the WCCP rather then in-line for these. If
show ip wccp returns not eabled or invalid, etc it skips it like any
other invalid command for a platform.
if i understand this; i'd create a separate rancid script for this thing.
At least in the 4.x code branch it is at least as IOS-ish as PIX/ASAs.
and, I should have made those a separate script. contain the ugly.
I'm not opposed to breaking it out into dedicated scripts for both if
that fits the design better. The ASA has a number of things that could
be captured as comment blocks that would be useful to track beyond the
basic IOS-ish device configs.

I'll work on the wae script at least this week if time permits.
--
---
James M Keller
john heasley
2010-02-18 04:38:21 UTC
Permalink
Post by James M Keller
Post by john heasley
Post by James M Keller
Post by john heasley
Post by James M Keller
It looks like lenny is 2.3.2 code (listed as current on shrubbery.net),
so I can do diff's when I'm down adding int WAE support to the main
rancid script. Central manager configs are retrievable from CLI. At
best you could script the command to dump the database to XML on the CM
file system and then try more dbfile.xml to terminal. But the admin
guide notes it's resource intensive to do the export. At least I'm able
to grab the acceleration-engine configs and also grab WAAS specific info
as comment entries. I'm likely going to have to tweak some of it to
parse out updating data like session counters, so not ready to dump a
diff yet. Also added WCCP info as comments for both the WAEs and Cisco
IOS, as our shop is using the WCCP rather then in-line for these. If
show ip wccp returns not eabled or invalid, etc it skips it like any
other invalid command for a platform.
if i understand this; i'd create a separate rancid script for this thing.
At least in the 4.x code branch it is at least as IOS-ish as PIX/ASAs.
and, I should have made those a separate script. contain the ugly.
I'm not opposed to breaking it out into dedicated scripts for both if
that fits the design better. The ASA has a number of things that could
be captured as comment blocks that would be useful to track beyond the
basic IOS-ish device configs.
my experience with asa/pix is limited. it'd seem those could be one
script, its the tie with ios that i wish i'd avoided.
Post by James M Keller
I'll work on the wae script at least this week if time permits.
--
---
James M Keller
Loading...