Discussion:
[rancid] Rancid 3.7 and Comware
David Chapman
2017-11-02 16:54:07 UTC
Permalink
We recently upgraded an old Rancid install and had problems with Comware. I found the new updated plugin for Rancid 3 and I realize this is not supported but wondering if some help could be provided.

The issue is one of our comware switches supports exit and quit while most typically only support quit so its not detecting it as a clean run. It errors with “End of run not found”


---- Except from cmw.pm----
if (/[\]>#]\a?\s*quit/) {
#if (/[>#]\s?exit$/) {
$clean_run = 1;
last;
}
----raw file---
#
return
<XXXXXXX>exit
Connection to XXXXXX closed.

---raw file if non affected switch---

return
<YYYYYY>exit
^
% Unrecognized command found at '^' position.
<YYYYYYY>quit
Connection to YYYYYYY closed.

---Version

display version
HP Comware Software, Version 7.1.045, Release 2311P05
Copyright (c) 2010-2014 Hewlett-Packard Development Company, L.P.
HP 5900AF-48XG-4QSFP+ Switch uptime is 89 weeks, 1 day, 17 hours, 17 minutes
Last reboot reason : Power on


This email, including any attached files, may contain confidential and privileged information. If you received this communication in error, please contact the sender by reply e-mail and delete all copies of this message.
David Chapman
2017-11-02 17:21:38 UTC
Permalink
I think I was able to trace it down to this line of code. Maybe extra code?

I’m not too familiar with TCL but my platform is set to cmw or blank and it still hits the exit-bad. I changed “exit” to “exit-bad” for debugging. Should that if statement be gone completely?

--- cmwlogin

if { [string compare "extreme" "$platform"] } {
send -h "exit-bad\r"
} else {
send -h "quit\r"
}
expect {
-re "^\[^\n\r *]*$reprompt" {
# the Cisco CE and Jnx ERX
# return to non-enabled mode
# on exit in enabled mode.
send -h "$exitcmd\r"
exp_continue;
}


This email, including any attached files, may contain confidential and privileged information. If you received this communication in error, please contact the sender by reply e-mail and delete all copies of this message.
heasley
2017-11-02 21:03:58 UTC
Permalink
Post by David Chapman
We recently upgraded an old Rancid install and had problems with Comware. I found the new updated plugin for Rancid 3 and I realize this is not supported but wondering if some help could be provided.
The issue is one of our comware switches supports exit and quit while most typically only support quit so its not detecting it as a clean run. It errors with “End of run not found”
---- Except from cmw.pm----
if (/[\]>#]\a?\s*quit/) {
#if (/[>#]\s?exit$/) {
#if (/[>#]\s?(quit|exit)$/) {
Post by David Chapman
$clean_run = 1;
last;
}
----raw file---
#
return
<XXXXXXX>exit
Connection to XXXXXX closed.
---raw file if non affected switch---
return
<YYYYYY>exit
^
% Unrecognized command found at '^' position.
<YYYYYYY>quit
Connection to YYYYYYY closed.
---Version
display version
HP Comware Software, Version 7.1.045, Release 2311P05
Copyright (c) 2010-2014 Hewlett-Packard Development Company, L.P.
HP 5900AF-48XG-4QSFP+ Switch uptime is 89 weeks, 1 day, 17 hours, 17 minutes
Last reboot reason : Power on
This email, including any attached files, may contain confidential and privileged information. If you received this communication in error, please contact the sender by reply e-mail and delete all copies of this message.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Loading...