Discussion:
[rancid] HP procurve 2910 stacked
Nerses Papoyan
2011-01-11 20:37:01 UTC
Permalink
Hi,
I'm having trouble with HP pro curve 2910 stacked switch. I have several other HP switches and don't have a problem, however only this "commander" switch is giving me problems. I need to pass the stack member number, but I'm unable doing so.
After I run "***@myrancid-host:/usr/var/logs# clogin 10.10.0.1", it gets stalled, and even manually I can't choose any of the members. (see the log below)

***@rancid01:/usr/var/logs# clogin 10.10.0.110.10.0.1spawn ssh -c 3des -x -l manager 10.10.0.1We'd like to keep you up to date about: * Software feature updates * New product announcements * Special events
Please register your products now at: www.ProCurve.com
***@10.10.0.1's password:
ProCurve J9145A 2910al-24G SwitchSoftware revision W.14.38
Copyright (C) 1991-2009 Hewlett-Packard Co. All Rights Reserved.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subdivision (b) (3) (ii) of the Rights in Technical Data and Computer Software clause at 52.227-7013.
HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303

Press any key to continue

Stack Members
SN MAC Address System Name Device Type Status -- ------------- ---------------- --------------------- ------------------------- 0 c09***** 2910-**** ProCurve Switch Commander Up 1 c***** 2910-**** ProCurve Switch Member Up 2 ************* 2510g **** ProCurve 2510G-48 Member Up 3 c***** 2910-**** ProCurve Switch Member Up 4 ************* 2510g **** ProCurve 2510G-48 Member Up 5 c***** 2910-**** ProCurve Switch Member Up 6 ************* 2510g **** ProCurve 2510G-48 Member Up
Enter switch number to connect to or <CR>:
Does anyone know how to correct the problem, so when I run "rancid-run" and having 10.10.0.1:hp:up in my router.db, to collect and save the configuration of the member "0" (commander)

Thank you in advance !
Nerses
Per-Olof Olsson
2011-01-20 09:35:42 UTC
Permalink
Hi


There is no way to backup config from other then stack commander from
rancid what i know. If you don't lite to turn of stack function
there is some lines to add in hlogin for answer the switch number promp.


*** hlogin.pre_fix Thu Jan 20 10:21:17 2011
--- hlogin Thu Jan 20 10:13:00 2011
***************
*** 389,408 ****
--- 389,412 ----
# talk to the TACACS server to authenticate you, or if the
# TACACS server is not working, then it will use the enable
# passwd. Or, the router might not have TACACS turned on,
# then it will just send the passwd.
# if telnet fails with connection refused, try ssh
expect {
"Press any key to continue" {
send " "
exp_continue
}
+ "Enter switch number to connect to or <CR>:" {
+ send "\r"
+ exp_continue
+ }
-re "(Connection refused|Secure connection \[^\n\r]+
refused|Connection closed by)" {
catch {close}; catch {wait};
if !$progs {
send_user "\nError: Connection Refused ($prog)\n"; return 1
}
}
"Host is unreachable" {
catch {close}; catch {wait};
send_user "\nError: Host Unreachable!\n"; wait; return 1
}


/Peo
----------------------------------------------------------
Per-Olof Olsson Email: ***@chalmers.se
Chalmers tekniska högskola IT-service
Hörsalsvägen 5 412 96 Göteborg
Tel: 031/772 6738 Fax: 031/772 8660
----------------------------------------------------------
Post by Nerses Papoyan
Hi,
I'm having trouble with HP pro curve 2910 stacked switch. I have several
other HP switches and don't have a problem, however only this
"commander" switch is giving me problems. I need to pass the stack
member number, but I'm unable doing so.
gets stalled, and even manually I can't choose any of the members. (see
the log below)
10.10.0.1
spawn ssh -c 3des -x -l manager 10.10.0.1
* Software feature updates
* New product announcements
* Special events
Please register your products now at: www.ProCurve.com
ProCurve J9145A 2910al-24G Switch
Software revision W.14.38
Copyright (C) 1991-2009 Hewlett-Packard Co. All Rights Reserved.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to
restrictions
as set forth in subdivision (b) (3) (ii) of the Rights in Technical
Data and
Computer Software clause at 52.227-7013.
HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303
Press any key to continue
Stack Members
SN MAC Address System Name Device Type Status
-- ------------- ---------------- ---------------------
-------------------------
0 c09***** 2910-**** ProCurve Switch Commander Up
1 c***** 2910-**** ProCurve Switch Member Up
2 ************* 2510g **** ProCurve 2510G-48 Member Up
3 c***** 2910-**** ProCurve Switch Member Up
4 ************* 2510g **** ProCurve 2510G-48 Member Up
5 c***** 2910-**** ProCurve Switch Member Up
6 ************* 2510g **** ProCurve 2510G-48 Member Up
Does anyone know how to correct the problem, so when I run "rancid-run"
and having 10.10.0.1:hp:up in my router.db, to collect and save the
configuration of the member "0" (commander)
Thank you in advance !
Nerses
john heasley
2011-01-21 20:19:44 UTC
Permalink
Post by Per-Olof Olsson
Hi
There is no way to backup config from other then stack commander
from rancid what i know. If you don't lite to turn of stack function
there is some lines to add in hlogin for answer the switch number promp.
no, not yet.

but, thanks for the patch.
Post by Per-Olof Olsson
*** hlogin.pre_fix Thu Jan 20 10:21:17 2011
--- hlogin Thu Jan 20 10:13:00 2011
***************
*** 389,408 ****
--- 389,412 ----
# talk to the TACACS server to authenticate you, or if the
# TACACS server is not working, then it will use the enable
# passwd. Or, the router might not have TACACS turned on,
# then it will just send the passwd.
# if telnet fails with connection refused, try ssh
expect {
"Press any key to continue" {
send " "
exp_continue
}
+ "Enter switch number to connect to or <CR>:" {
+ send "\r"
+ exp_continue
+ }
-re "(Connection refused|Secure connection \[^\n\r]+
refused|Connection closed by)" {
catch {close}; catch {wait};
if !$progs {
send_user "\nError: Connection Refused ($prog)\n"; return 1
}
}
"Host is unreachable" {
catch {close}; catch {wait};
send_user "\nError: Host Unreachable!\n"; wait; return 1
}
/Peo
----------------------------------------------------------
Chalmers tekniska h?gskola IT-service
H?rsalsv?gen 5 412 96 G?teborg
Tel: 031/772 6738 Fax: 031/772 8660
----------------------------------------------------------
Post by Nerses Papoyan
Hi,
I'm having trouble with HP pro curve 2910 stacked switch. I have
several other HP switches and don't have a problem, however only
this "commander" switch is giving me problems. I need to pass the
stack member number, but I'm unable doing so.
it gets stalled, and even manually I can't choose any of the
members. (see the log below)
10.10.0.1
spawn ssh -c 3des -x -l manager 10.10.0.1
* Software feature updates
* New product announcements
* Special events
Please register your products now at: www.ProCurve.com
ProCurve J9145A 2910al-24G Switch
Software revision W.14.38
Copyright (C) 1991-2009 Hewlett-Packard Co. All Rights Reserved.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the Government is subject to
restrictions
as set forth in subdivision (b) (3) (ii) of the Rights in
Technical Data and
Computer Software clause at 52.227-7013.
HEWLETT-PACKARD COMPANY, 3000 Hanover St., Palo Alto, CA 94303
Press any key to continue
Stack Members
SN MAC Address System Name Device Type Status
-- ------------- ---------------- ---------------------
-------------------------
0 c09***** 2910-**** ProCurve Switch Commander
Up 1 c***** 2910-**** ProCurve Switch
Member Up 2 ************* 2510g ****
ProCurve 2510G-48 Member Up
3 c***** 2910-**** ProCurve Switch Member Up
4 ************* 2510g **** ProCurve 2510G-48 Member Up
5 c***** 2910-**** ProCurve Switch Member Up
6 ************* 2510g **** ProCurve 2510G-48 Member Up
Does anyone know how to correct the problem, so when I run
"rancid-run" and having 10.10.0.1:hp:up in my router.db, to
collect and save the configuration of the member "0" (commander)
Thank you in advance !
Nerses
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
hamelin marc
2013-12-06 10:06:04 UTC
Permalink
Hello,
for rancid with stack, I have an answer with this patch for hlogin (lines
449-478) :

-re "$p_prompt" {
if ![string compare $prog "ssh"] {
send -- "$userpswd\r"
} else {
send -- "$passwd\r"
}
expect {
+ "Enter switch number to connect to or <CR>:" {
+ send "0\r"
+ exp_continue
+ }
eof { send_user "\nError: Couldn't login\n";
wait;
return 1
}
"Press any key to continue" {
send " ";
exp_continue
}
-re "$e_prompt" { send -- "$enapasswd\r" }
"$prompt" { set in_proc 0;
return 0
}
}
exp_continue
}
Loading...