Mailing List Archive

Prevent PAGP messages from showing up in diffs
Greetings,

I get mail almost every time Rancid runs due to PAGP messages. What
would be the best way to prevent such messages from showing up in the
diffs?

Anchi

-----Original Message-----
From: Zhang, Anchi
Sent: Tuesday, March 05, 2002 9:05 AM
To: rancid-cisco at log2.reliant.com
Subject: cisco router config diffs


Index: configs/rep17_6509
===================================================================
retrieving revision 1.7
diff -u -4 -r1.7 rep17_6509
@@ -641,9 +641,8 @@
set trunk 3/18 off negotiate 1-1005,1025-4094
set trunk 3/19 off negotiate 1-1005,1025-4094
set trunk 3/20 off negotiate 1-1005,1025-4094
set trunk 3/21 off negotiate 1-1005,1025-4094
- 2002 Mar 05 08:03:09 CST -06:00 %PAGP-5-PORTFROMSTP:Port 2/23 left
bridge port 2/23
set trunk 3/22 off negotiate 1-1005,1025-4094
set trunk 3/23 off negotiate 1-1005,1025-4094
set trunk 3/24 off negotiate 1-1005,1025-4094
set trunk 3/25 off negotiate 1-1005,1025-4094
@@ -744,9 +743,8 @@
set trunk 5/2 off negotiate 1-1005,1025-4094
set trunk 5/3 off negotiate 1-1005,1025-4094
set trunk 5/4 off negotiate 1-1005,1025-4094
set trunk 5/5 off negotiate 1-1005,1025-4094
- 2002 Mar 05 08:03:09 CST -06:00 %PAGP-5-PORTFROMSTP:Port 3/13 left
bridge port 3/13
set trunk 5/6 off negotiate 1-1005,1025-4094
set trunk 5/7 off negotiate 1-1005,1025-4094
set trunk 5/8 off negotiate 1-1005,1025-4094
set trunk 5/9 off negotiate 1-1005,1025-4094
Index: configs/rep7_6509
===================================================================
retrieving revision 1.8
diff -u -4 -r1.8 rep7_6509
@@ -451,8 +451,9 @@
! 9/46 347
! 9/47 348
! 9/48 349
!
+ 2002 Mar 05 09:04:04 CST -06:00 %PAGP-5-PORTFROMSTP:Port 3/34 left
bridge port 3/34
begin
!
# ***** NON-DEFAULT CONFIGURATION *****
!
Index: configs/rep9_6509
===================================================================
retrieving revision 1.27
diff -u -4 -r1.27 rep9_6509
@@ -448,9 +448,8 @@
! 9/46 398
! 9/47 399
! 9/48 400
!
- ..........2002 Mar 05 08:03:53 CST -06:00 %PAGP-5-PORTTOSTP:Port 4/11
joined bridge port 4/11
begin
!
# ***** NON-DEFAULT CONFIGURATION *****
!
Prevent PAGP messages from showing up in diffs [ In reply to ]
On Tue, Mar 05, 2002 at 09:14:12AM -0600, Zhang, Anchi wrote:
> I get mail almost every time Rancid runs due to PAGP messages. What
> would be the best way to prevent such messages from showing up in the
> diffs?

What type of router (switch?) is that?

It looks like said box is sending syslog messages to the login
session that rancid is using. I seem to recall running into some
box that had a bug where you could not turn this off (the stupid
box insisted on sysloging its messages to *every* session on the
box, even if you didn't do the equivalent of 'term mon').

Automatically getting rid of this junk is quite a pain since it
can essentially show up anywhere in the output stream (including
in the middle of a line).


Query: Can you configure your router to not send these messages to
the telnet/ssh// session that rancid uses? Or is there some sort
of command rancid can issue (ala 'term len 0') when it logs in to
not get these messages? Or is this one of those broken boxes I
recall? [.In which case the only real option is to beat on the
vendor to get them to fix their stupid bug.]

--asp
Prevent PAGP messages from showing up in diffs [ In reply to ]
Thanks for your reply.

They are Catalyst 6509 switches.

"set logging session disable" will "disable the sending of system
logging messages to the current login session." How best should I add
this command to rancid?

Anchi

-----Original Message-----
From: Andrew Partan [mailto:asp@partan.com]
Sent: Tuesday, March 05, 2002 10:23 PM
To: Zhang, Anchi
Cc: rancid-discuss at shrubbery.net
Subject: Re: Prevent PAGP messages from showing up in diffs


On Tue, Mar 05, 2002 at 09:14:12AM -0600, Zhang, Anchi wrote:
> I get mail almost every time Rancid runs due to PAGP messages. What
> would be the best way to prevent such messages from showing up in the
> diffs?

What type of router (switch?) is that?

It looks like said box is sending syslog messages to the login
session that rancid is using. I seem to recall running into some
box that had a bug where you could not turn this off (the stupid
box insisted on sysloging its messages to *every* session on the
box, even if you didn't do the equivalent of 'term mon').

Automatically getting rid of this junk is quite a pain since it
can essentially show up anywhere in the output stream (including
in the middle of a line).


Query: Can you configure your router to not send these messages to
the telnet/ssh// session that rancid uses? Or is there some sort
of command rancid can issue (ala 'term len 0') when it logs in to
not get these messages? Or is this one of those broken boxes I
recall? [.In which case the only real option is to beat on the
vendor to get them to fix their stupid bug.]

--asp
Prevent PAGP messages from showing up in diffs [ In reply to ]
On Wed, Mar 06, 2002 at 09:18:15AM -0600, Zhang, Anchi wrote:
> "set logging session disable" will "disable the sending of system
> logging messages to the current login session." How best should I add
> this command to rancid?

Are you using the latest bits? clogin already has:
send "set logging session disable\r"

--asp

} elseif { $do_script } {
# If the prompt is (enable), then we are on a switch and the
# command is "set length 0"; otherwise its "term length 0".
if [ regexp -- ".*> .*enable" "$prompt" ] {
send "set length 0\r"
send "set logging session disable\r"
} else {
send "term length 0\r"
}
Prevent PAGP messages from showing up in diffs [ In reply to ]
I think so:

log2# grep "set logging session disable" clogin
send "set logging session disable\r"
log2#

-----Original Message-----
From: Andrew Partan [mailto:asp@partan.com]
Sent: Wednesday, March 06, 2002 9:23 AM
To: Zhang, Anchi
Cc: rancid-discuss at shrubbery.net
Subject: Re: Prevent PAGP messages from showing up in diffs


On Wed, Mar 06, 2002 at 09:18:15AM -0600, Zhang, Anchi wrote:
> "set logging session disable" will "disable the sending of system
> logging messages to the current login session." How best should I add
> this command to rancid?

Are you using the latest bits? clogin already has:
send "set logging session disable\r"

--asp

} elseif { $do_script } {
# If the prompt is (enable), then we are on a switch and the
# command is "set length 0"; otherwise its "term length 0".
if [ regexp -- ".*> .*enable" "$prompt" ] {
send "set length 0\r"
send "set logging session disable\r"
} else {
send "term length 0\r"
}
Prevent PAGP messages from showing up in diffs [ In reply to ]
On Wed, Mar 06, 2002 at 09:26:08AM -0600, Zhang, Anchi wrote:
> log2# grep "set logging session disable" clogin
> send "set logging session disable\r"

Hmm; so what is that not working? Does this command actually work
on the switch & code you are running? Is rancid sending this
command to your switch?
--asp
Prevent PAGP messages from showing up in diffs [ In reply to ]
The command acctually works if I login and issue the command manually.

What would be a good way to tell whether rancid actually sends this
command?

Anchi

-----Original Message-----
From: Andrew Partan [mailto:asp@partan.com]
Sent: Wednesday, March 13, 2002 9:17 PM
To: Zhang, Anchi
Cc: rancid-discuss at shrubbery.net
Subject: Re: Prevent PAGP messages from showing up in diffs


On Wed, Mar 06, 2002 at 09:26:08AM -0600, Zhang, Anchi wrote:
> log2# grep "set logging session disable" clogin
> send "set logging session disable\r"

Hmm; so what is that not working? Does this command actually work
on the switch & code you are running? Is rancid sending this
command to your switch?
--asp
Prevent PAGP messages from showing up in diffs [ In reply to ]
Thu, Mar 14, 2002 at 11:17:43AM -0600, Zhang, Anchi:
> The command acctually works if I login and issue the command manually.
>
> What would be a good way to tell whether rancid actually sends this
> command?
>
> Anchi

it is only sent when using a script (clogin -s). iirc, this is a
system-wide ocmmand, not a per-login/terminal setting. best is to
make this a permanent part of your configuration.

> -----Original Message-----
> From: Andrew Partan [mailto:asp at partan.com]
> Sent: Wednesday, March 13, 2002 9:17 PM
> To: Zhang, Anchi
> Cc: rancid-discuss at shrubbery.net
> Subject: Re: Prevent PAGP messages from showing up in diffs
>
>
> On Wed, Mar 06, 2002 at 09:26:08AM -0600, Zhang, Anchi wrote:
> > log2# grep "set logging session disable" clogin
> > send "set logging session disable\r"
>
> Hmm; so what is that not working? Does this command actually work
> on the switch & code you are running? Is rancid sending this
> command to your switch?
> --asp
Prevent PAGP messages from showing up in diffs [ In reply to ]
Thanks for your pointer. Adding -s to clogin made it work:

log2# diff cat5rancid cat5rancid.orig
1031c1031
< system "clogin -s -t $timeo -c \"$cisco_cmds\" $host </dev/null
> $host.raw 2>&1" || die "clogin failed for $host: $!\n";
---
> system "clogin -t $timeo -c \"$cisco_cmds\" $host </dev/null >
$host.raw 2>&1" || die "clogin failed for $host: $!\n";

-----Original Message-----
From: john heasley [mailto:heas@shrubbery.net]
Sent: Friday, March 15, 2002 3:45 PM
To: Zhang, Anchi
Cc: Andrew Partan; rancid-discuss at shrubbery.net
Subject: Re: Prevent PAGP messages from showing up in diffs


Thu, Mar 14, 2002 at 11:17:43AM -0600, Zhang, Anchi:
> The command acctually works if I login and issue the command manually.
>
> What would be a good way to tell whether rancid actually sends this
> command?
>
> Anchi

it is only sent when using a script (clogin -s). iirc, this is a
system-wide ocmmand, not a per-login/terminal setting. best is to
make this a permanent part of your configuration.

> -----Original Message-----
> From: Andrew Partan [mailto:asp at partan.com]
> Sent: Wednesday, March 13, 2002 9:17 PM
> To: Zhang, Anchi
> Cc: rancid-discuss at shrubbery.net
> Subject: Re: Prevent PAGP messages from showing up in diffs
>
>
> On Wed, Mar 06, 2002 at 09:26:08AM -0600, Zhang, Anchi wrote:
> > log2# grep "set logging session disable" clogin
> > send "set logging session disable\r"
>
> Hmm; so what is that not working? Does this command actually work
> on the switch & code you are running? Is rancid sending this
> command to your switch?
> --asp