Re: [rancid] rancid 3.7 and HP 1910-8G - can't get rancid to work with that router

2017-12-12 Thread Jethro R Binks
On Mon, 11 Dec 2017, heasley wrote:

> HP OEMs a lot of their network hardware; so while badged hp, its not one
> to rancid due to the o/s.  look at rancid.types.base; there are a number
> of comments there about HP devices and the rancid types that are known to
> work with them.

1910 is a Comware 5 model.

> h3crancid is a 3rdparty module.  Those errors imply to me that some 
> command required by that module are not implemented by the device.

(I wrote it)

Output for unrecognised commands should be skipped properly (some commands 
work on some models or comware versions and not on others, but this should 
all be handled properly).

> the errors before that appear to be programming errors, likely grammar 
> that was permissible in a previous version of perl.

That seems likely, but I don't keep up much with perl to know.  But I 
don't see where this error might be coming from.

defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)

I've attached another h3crancid which is one I use locally.  I can't be 
sure it doesn't have some local hacks but be interesting to see if it 
makes this error go away.

Beyond that, follow David's advice by running it with some debugging, I 
would do something like:

  env NOPIPE=YES PATH=${PATH}:/usr/local/libexec/rancid rancid -d devicename

adjusting the path to rancid accordingly.  That will give you the .new and 
.raw files in the current directory which might be enlightening.

Jethro.

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
Jethro R Binks, Network Manager,
Information Services Directorate, University Of Strathclyde, Glasgow, UK

The University of Strathclyde is a charitable body, registered in
Scotland, number SC015263.#! /usr/bin/perl5
##
## $Id: $
##
## @PACKAGE@ @VERSION@
## Copyright (c) @COPYYEARS@ by Terrapin Communications, Inc.
## All rights reserved.
##
## This code is derived from software contributed to and maintained by
## Terrapin Communications, Inc. by Henry Kilmer, John Heasley, Andrew Partan,
## Pete Whiting, Austin Schutz, and Andrew Fort.
##
## Redistribution and use in source and binary forms, with or without
## modification, are permitted provided that the following conditions
## are met:
## 1. Redistributions of source code must retain the above copyright
##notice, this list of conditions and the following disclaimer.
## 2. Redistributions in binary form must reproduce the above copyright
##notice, this list of conditions and the following disclaimer in the
##documentation and/or other materials provided with the distribution.
## 3. All advertising materials mentioning features or use of this software
##must display the following acknowledgement:
##This product includes software developed by Terrapin Communications,
##Inc. and its contributors for RANCID.
## 4. Neither the name of Terrapin Communications, Inc. nor the names of its
##contributors may be used to endorse or promote products derived from
##this software without specific prior written permission.
## 5. It is requested that non-binding fixes and modifications be contributed
##back to Terrapin Communications, Inc.
##
## THIS SOFTWARE IS PROVIDED BY Terrapin Communications, INC. AND CONTRIBUTORS
## ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
## TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
## PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COMPANY OR CONTRIBUTORS
## BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
## CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
## SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
## INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
## CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
## ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
## POSSIBILITY OF SUCH DAMAGE.
#
#  RANCID - Really Awesome New Cisco confIg Differ
#

# h3crancid
#
# h3clogin/h3crancid covers the following product ranges:
#
#  * 3Com SuperStack 4 (from 'joint venture' with Huawei)
#  * H3C
#  * HP Networking ('A' & some 'E' portfolio, post-2010 3Com acquitision)
#
# They may also work with some Huawei equipment.
#
# https://sites.google.com/site/jrbinks/code/rancid/h3c

#
# Usage: h3crancid [-dltCV] [-f filename | hostname]
#

# You can modify the behaviour by changing the variables listed in
# 'END-USER TWEAKS', below.

# Notable changes from standard *rancid programs:
#
# * abstracted path to the 'tail' utility
# * altered "cisco_cmds" to be "device_cmds"
# * define and use $logincmd
# * abstracted $rancid_type

# TODO:
#
# It may be useful to pull common subroutines like the sorting ones into
# a library for use by all the *rancid programs.
#
# abstract the comment-out char (i.e., '!' here and cisco, '#' on Juniper)
# to a variable.

# 

Re: [rancid] rancid 3.7 and HP 1910-8G - can't get rancid to work with that router

2017-12-11 Thread heasley
Mon, Dec 11, 2017 at 02:51:27PM +, Eichhorn, Thomas:
> Hello,
> 
> I'm new to rancid and don't know, how to solve my problem. Maybe someone can 
> help me.
> 
> I did setup rancid 3.7. Everything works quite well so far except for some 
> routers.
> 
> We've got a HP 1910-8G and I can't find a way to get rancid to work probably 
> with that router type.
> 
> If router type is set to 'hp', rancid-run won't end his run and runs forever 
> without any configs get backed up.

HP OEMs a lot of their network hardware; so while badged hp, its not one
to rancid due to the o/s.  look at rancid.types.base; there are a number
of comments there about HP devices and the rancid types that are known to
work with them.

> I've found some scripts ('h3clogin'; 'h3crancid') on another server in our 
> network. rancid-run ends correctly with this script but throws some errors:
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> lnb-o2a: End of run not found
>  % Unrecognized command found at '^' position.
> defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
> (Maybe you should just omit the defined()?)
> lnb-o2b: End of run not found
>  % Unrecognized command found at '^' position.
> lnb-o3a: End of run not found
>  % Unrecognized command found at '^' position.
> lnb-o1a: End of run not found
>  % Unrecognized command found at '^' position.
> lnb-o1b: End of run not found
>  % Unrecognized command found at '^' position.
> lnb-o3b: End of run not found
>  % Unrecognized command found at '^' position.
> 
> Now I don't know what to do. Any suggestions?

h3crancid is a 3rdparty module.  Those errors imply to me that some command
required by that module are not implemented by the device.

the errors before that appear to be programming errors, likely grammar
that was permissible in a previous version of perl.

Grüße

___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss


[rancid] rancid 3.7 and HP 1910-8G - can't get rancid to work with that router

2017-12-11 Thread Eichhorn, Thomas
Hello,

I'm new to rancid and don't know, how to solve my problem. Maybe someone can 
help me.

I did setup rancid 3.7. Everything works quite well so far except for some 
routers.

We've got a HP 1910-8G and I can't find a way to get rancid to work probably 
with that router type.

If router type is set to 'hp', rancid-run won't end his run and runs forever 
without any configs get backed up.

I've found some scripts ('h3clogin'; 'h3crancid') on another server in our 
network. rancid-run ends correctly with this script but throws some errors:
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
lnb-o2a: End of run not found
 % Unrecognized command found at '^' position.
defined(%hash) is deprecated at /usr/local/rancid/bin/h3crancid line 121.
(Maybe you should just omit the defined()?)
lnb-o2b: End of run not found
 % Unrecognized command found at '^' position.
lnb-o3a: End of run not found
 % Unrecognized command found at '^' position.
lnb-o1a: End of run not found
 % Unrecognized command found at '^' position.
lnb-o1b: End of run not found
 % Unrecognized command found at '^' position.
lnb-o3b: End of run not found
 % Unrecognized command found at '^' position.

Now I don't know what to do. Any suggestions?

Thanks.

Best regards,

Thomas



Klinikum Nürnberg, Sitz: Nürnberg, Amtsgericht Nürnberg -Registergericht- HRA 
14190, Vorstand: Prof. Dr. Achim Jockwig (Vorsitzender), Dr. Andreas Becke, 
Univ.-Prof. Dr. Dr. Günter Niklewski, Peter Schuh
___
Rancid-discuss mailing list
Rancid-discuss@shrubbery.net
http://www.shrubbery.net/mailman/listinfo/rancid-discuss