Discussion:
[rancid] Procurve hlogin "show lldp expect"
Regis A. Despres
2009-03-03 16:14:34 UTC
Permalink
Hi,

I'm facing a strange behavior trying to get "show lldp info remote-device" from a procurve J4904A.
telnet and ssh hlogin expect script both hangs after giving those infos.
It appears to see an unwanted space just in front the hostname. I don't really have a clue if that is why that hangs.
If someone have a idea ... =)


i.e.:

###################################################################################
shell> hlogin -c "sh lld info rem" IP

[snip]
LLDP Remote Devices Information

LocalPort | ChassisId PortId PortDescr SysName
--------- + ------------------------- ------ --------- ----------------------
hostname01#
[hang]
###################################################################################

here is the debug output:

###################################################################################
[snip]
expect: does " --------- + ------------------------- ------ --------- ----------------------\r\n\r " (spawn_id exp4) match regular expression "^[^\n\r *]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n\r"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " --------- + ------------------------- ------ --------- ----------------------\r\n\r"
--------- + ------------------------- ------ --------- ----------------------
expect: continuing expect

expect: does " " (spawn_id exp4) match regular expression "^[^\n\r *]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? no
"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? no
"^<-+ More -+>[^\n\r]*"? no
"^-+ MORE -+[^\n\r]*"? no
"^-More-[^\n\r-]*"? no
"^--More--[^\n\r-]*"? no
"^---+More---+[^\n\r]*"? no
"\u0008+"? no

expect: does " 45 | 00 17 08 c7 25 80 48 48 BISWI55INL01 \r\n\r 46 | 00 16 35 21 56 80 47 47 BISWI58INLO1 \r\n\r hostname01# " (spawn_id exp4) match regular expression "^[^\n\r *]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n\r"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " 45 | 00 17 08 c7 25 80 48 48 BISWI55INL01 \r\n\r"
45 | 00 17 08 c7 25 80 48 48 BISWI55INL01
expect: continuing expect

expect: does " 46 | 00 16 35 21 56 80 47 47 BISWI58INLO1 \r\n\r hostname01# " (spawn_id exp4) match regular expression "^[^\n\r *]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?"? no
"^[^\n\r]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? yes
expect: set expect_out(0,string) "\r\n\r"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " 46 | 00 16 35 21 56 80 47 47 BISWI58INLO1 \r\n\r"
46 | 00 16 35 21 56 80 47 47 BISWI58INLO1
expect: continuing expect

expect: does " hostname01# " (spawn_id exp4) match regular expression "^[^\n\r
"^[^\n\r]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? yes
expect: set expect_out(0,string) " hostname01# "
expect: set expect_out(1,string) "1"
expect: set expect_out(spawn_id) "exp4"
expect: set expect_out(buffer) " hostname01# "
hostname01# expect: continuing expect

expect: does "" (spawn_id exp4) match regular expression "^[^\n\r *]*hostname0
"^[^\n\r]*hostname0([^#>\r\n]+)?[#>](\([^)\r\n]+\))?."? no
"[\n\r]+"? no
"[^\r\n]*Press <SPACE> to cont[^\r\n]*"? no
"^<-+ More -+>[^\n\r]*"? no
"^-+ MORE -+[^\n\r]*"? no
"^-More-[^\n\r-]*"? no
"^--More--[^\n\r-]*"? no
"^---+More---+[^\n\r]*"? no
"\u0008+"? no
expect: timed out

Error: TIMEOUT reached
write() failed to write anything - will sleep(1) and retry...
[Killed]
###################################################################################
john heasley
2009-03-03 19:30:35 UTC
Permalink
Post by Regis A. Despres
Hi,
I'm facing a strange behavior trying to get "show lldp info remote-device" from a procurve J4904A.
telnet and ssh hlogin expect script both hangs after giving those infos.
It appears to see an unwanted space just in front the hostname. I don't really have a clue if that is why that hangs.
If someone have a idea ... =)
It really shouldn't be continuing there. Could you try the attached patch?
Regis A. Despres
2009-03-04 18:02:05 UTC
Permalink
! Tue, Mar 03, 2009 at 05:14:34PM +0100, Regis A. Despres:
!>
!> Hi,
!>
!> I'm facing a strange behavior trying to get "show lldp info
!> remote-device" from a procurve J4904A.
!> telnet and ssh hlogin expect script both hangs after giving those infos.
!> It appears to see an unwanted space just in front the hostname. I don't
!> really have a clue if that is why that hangs.
!> If someone have a idea ... =)
!
! It really shouldn't be continuing there. Could you try the attached
! patch?
!

Great. Works like a charm !
Next step is ringing freebsd port maintener =)
David Newman
2009-03-04 18:30:19 UTC
Permalink
Post by Regis A. Despres
!>
!> Hi,
!>
!> I'm facing a strange behavior trying to get "show lldp info
!> remote-device" from a procurve J4904A.
!> telnet and ssh hlogin expect script both hangs after giving those infos.
!> It appears to see an unwanted space just in front the hostname. I don't
!> really have a clue if that is why that hangs.
!> If someone have a idea ... =)
!
! It really shouldn't be continuing there. Could you try the attached
! patch?
!
Great. Works like a charm !
Next step is ringing freebsd port maintener =)
Current rancid-devel port on FreeBSD is 2.3.2a7. It would be very good
to bump this up to 2.3.2a9.

thanks

dn
Post by Regis A. Despres
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Régis A. Despres
2009-03-04 19:00:52 UTC
Permalink
That's already the case =]
Just portsnap and here you go =]



---
Régis A. Despres
Post by David Newman
Post by Regis A. Despres
!>
!> Hi,
!>
!> I'm facing a strange behavior trying to get "show lldp info
!> remote-device" from a procurve J4904A.
!> telnet and ssh hlogin expect script both hangs after giving those infos.
!> It appears to see an unwanted space just in front the hostname. I don't
!> really have a clue if that is why that hangs.
!> If someone have a idea ... =)
!
! It really shouldn't be continuing there. Could you try the
attached
! patch?
!
Great. Works like a charm !
Next step is ringing freebsd port maintener =)
Current rancid-devel port on FreeBSD is 2.3.2a7. It would be very good
to bump this up to 2.3.2a9.
thanks
dn
Post by Regis A. Despres
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Loading...