[rancid] Problems with hpuifilter / hlogin

heasley heas at shrubbery.net
Tue Jun 27 22:12:18 UTC 2017


Fri, May 19, 2017 at 03:54:33PM +0100, Brian Candler:
> Back in 2015, I submitted a fix to hpuifilter:
> http://www.shrubbery.net/pipermail/rancid-discuss/2015-December/008823.html
> 
> This was incorporated into rancid 3.3.0.  Unfortunately, rancid 3.3.0 
> from Ubuntu 16.04 still doesn't work with HP, and it turns out there are 
> a couple of problems.
> 
> (1) When the patch was merged, it seems an error was added in 
> bin/hpuifilter.c, function complete_esc(). The line which now says
> 
>                  return(i + 10);
> 
> should have been
> 
>                  return(i + 1);
> 
> That's a simple fix to make, and still is apparently required in 3.6.2. [^1]

done; thanks.

> (2) hlogin from 3.3.0 was having problems with the prompt, which I was 
> able to replicate like this to a J9775A:
> 
> /usr/lib/rancid/bin/hlogin -d -t 20 -c"show version;show flash;show 
> system-information;show system information;show module;show stack;show 
> tech transceivers;show config files;show config status;write term" 
> ix-edgesw-r1b1b.int.example.net
> 
> ...
> 
> send: sending "no page\r" to { exp5 }
> Gate keeper glob pattern for 'ix-edgesw-r' is 'ix-edgesw-r'. Activating 
> booster.
> Gate keeper glob pattern for '[
> ]+' is ''. Not usable, disabling the performance booster.
> 
> expect: does "" (spawn_id exp5) match regular expression "ix-edgesw-r"? 
> Gate "ix-edgesw-r"? gate=no
> "[\n\r]+"? (No Gate, RE only) gate=yes re=no
> no page
> ix-edgesw-r1b1b#
> expect: does "no page\r\r\nix-edgesw-r1b1b# " (spawn_id exp5) match 
> regular expression "ix-edgesw-r"? Gate "ix-edgesw-r"? gate=yes re=yes
> expect: set expect_out(0,string) "ix-edgesw-r"
> expect: set expect_out(spawn_id) "exp5"
> expect: set expect_out(buffer) "no page\r\r\nix-edgesw-r"
> Gate keeper glob pattern for 
> 'ix-edgesw-r([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?' is 'ix-edgesw-r*'. 
> Activating booster.
> Gate keeper glob pattern for 'Invalid input: 0[
> ]+' is 'Invalid input: 0*'. Activating booster.
> Gate keeper glob pattern for '[
> ]+' is ''. Not usable, disabling the performance booster.
> 
> expect: does "1b1b# " (spawn_id exp5) match regular expression 
> "ix-edgesw-r([^#>\r\n]+)?[#>](\\([^)\\r\\n]+\\))?"? Gate "ix-edgesw-r*"? 
> gate=no
> "Invalid input: 0[\n\r]+"? Gate "Invalid input: 0*"? gate=no
> "[\n\r]+"? (No Gate, RE only) gate=yes re=no
> <<<hangs here>>>
> expect: timed out
> 
> Error: TIMEOUT reached
> 
> However, the version of hlogin from 2.3.6 works fine (from ubuntu 
> 12.04), and also hlogin from 3.6.2 (current code), so I've just replaced 
> hlogin with the new one rather than digging any further.

Comparing 3.3 to current, I do not see a cause for this.  Please mention
it, if it occurs again.

> Regards,
> 
> Brian.
> 
> 
> [^1] The same line in in the 3.6.2 tarball, but for testing purposes I'm 
> just rebuilding hpuifilter from 3.3.0 like this:
> 
> apt-get install dpkg-dev
> apt-get source rancid
> cd rancid-3.3.0
> ./configure
> cd bin
> # apply patch by hand: vi hpuifilter.c
> make hpuifilter
> sudo cp -p hpuifilter /usr/lib/rancid/bin/
> 
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss



More information about the Rancid-discuss mailing list