Mailing List Archive

h3crancid problem
Hello,
I have a problem when trying to rancid h3c switches :

rancid@jersey:~$ PATH=$PATH:/usr/local/rancid/bin ./bin/rancid -d -t h3c
sw-hp-hits-stack
loadtype: device type h3c
loadtype: found device type h3c at
/usr/local/rancid/etc/rancid.types.base:595
loadtype: found device type h3c aliased to h3crancid
loadtype: device type h3crancid
loadtype: found device type h3crancid at
/usr/local/rancid/etc/rancid.types.base:596
executing h3clogin -t 90 -c"" sw-hp-hits-stack
sw-hp-hits-stack: missed cmd(s): all commands
sw-hp-hits-stack: End of run not found
sw-hp-hits-stack: clean_run is false
sw-hp-hits-stack: found_end is false


I don't understand why the "-c" parameter is empty.

when running directly h3crancid it works fine :
rancid@jersey:~$ PATH=$PATH:/usr/local/rancid/bin ./bin/h3crancid -d
sw-hp-hits-stack -h
executing h3clogin -t 20 -c"display version;display startup;dir /all
/all-filesystems;display device;display fan;display power;display
domain;display local-user;display ssh server status;display ntp-service
status;display current-configuration" sw-hp-hits-stack
PROMPT MATCH: <HP-HITS-stack>
HIT COMMAND:<HP-HITS-stack>display version
In CommentOutput: <HP-HITS-stack>display version
HIT COMMAND:<HP-HITS-stack>display startup
In CommentOutput: <HP-HITS-stack>display startup
HIT COMMAND:<HP-HITS-stack>dir /all /all-filesystems
In CommentOutput: <HP-HITS-stack>dir /all /all-filesystems
HIT COMMAND:<HP-HITS-stack>display device
In CommentOutput: <HP-HITS-stack>display device
HIT COMMAND:<HP-HITS-stack>display fan
In CommentOutput: <HP-HITS-stack>display fan
HIT COMMAND:<HP-HITS-stack>display power
In CommentOutput: <HP-HITS-stack>display power
HIT COMMAND:<HP-HITS-stack>display domain
In CommentOutput: <HP-HITS-stack>display domain
HIT COMMAND:<HP-HITS-stack>display local-user
In CommentOutput: <HP-HITS-stack>display local-user
HIT COMMAND:<HP-HITS-stack>display ssh server status
In CommentOutput: <HP-HITS-stack>display ssh server status
HIT COMMAND:<HP-HITS-stack>display ntp-service status
In CommentOutput: <HP-HITS-stack>display ntp-service status
HIT COMMAND:<HP-HITS-stack>display current-configuration
In DisplayCurrent: <HP-HITS-stack>display current-configuration
sw-hp-hits-stack: clean_run=1 found_end=1


can anybody telle me where I'm wrong please ?
Regards
Re: h3crancid problem [ In reply to ]
Mon, Dec 06, 2021 at 10:46:39AM +0100, BASSAGET C?dric:
> Hello,
> I have a problem when trying to rancid h3c switches :
>
> rancid@jersey:~$ PATH=$PATH:/usr/local/rancid/bin ./bin/rancid -d -t h3c
> sw-hp-hits-stack
> loadtype: device type h3c
> loadtype: found device type h3c at
> /usr/local/rancid/etc/rancid.types.base:595
> loadtype: found device type h3c aliased to h3crancid
> loadtype: device type h3crancid
> loadtype: found device type h3crancid at
> /usr/local/rancid/etc/rancid.types.base:596
> executing h3clogin -t 90 -c"" sw-hp-hits-stack
> sw-hp-hits-stack: missed cmd(s): all commands
> sw-hp-hits-stack: End of run not found
> sw-hp-hits-stack: clean_run is false
> sw-hp-hits-stack: found_end is false
>
>
> I don't understand why the "-c" parameter is empty.

An error in your rancid.types.conf file, I presume. It should resemble
the built-in alteon device type spec. Maybe try one of the other built-in
device types that most closely resemble your device?

> when running directly h3crancid it works fine :
> rancid@jersey:~$ PATH=$PATH:/usr/local/rancid/bin ./bin/h3crancid -d
> sw-hp-hits-stack -h
> executing h3clogin -t 20 -c"display version;display startup;dir /all
> /all-filesystems;display device;display fan;display power;display
> domain;display local-user;display ssh server status;display ntp-service
> status;display current-configuration" sw-hp-hits-stack
> PROMPT MATCH: <HP-HITS-stack>
> HIT COMMAND:<HP-HITS-stack>display version
> In CommentOutput: <HP-HITS-stack>display version
> HIT COMMAND:<HP-HITS-stack>display startup
> In CommentOutput: <HP-HITS-stack>display startup
> HIT COMMAND:<HP-HITS-stack>dir /all /all-filesystems
> In CommentOutput: <HP-HITS-stack>dir /all /all-filesystems
> HIT COMMAND:<HP-HITS-stack>display device
> In CommentOutput: <HP-HITS-stack>display device
> HIT COMMAND:<HP-HITS-stack>display fan
> In CommentOutput: <HP-HITS-stack>display fan
> HIT COMMAND:<HP-HITS-stack>display power
> In CommentOutput: <HP-HITS-stack>display power
> HIT COMMAND:<HP-HITS-stack>display domain
> In CommentOutput: <HP-HITS-stack>display domain
> HIT COMMAND:<HP-HITS-stack>display local-user
> In CommentOutput: <HP-HITS-stack>display local-user
> HIT COMMAND:<HP-HITS-stack>display ssh server status
> In CommentOutput: <HP-HITS-stack>display ssh server status
> HIT COMMAND:<HP-HITS-stack>display ntp-service status
> In CommentOutput: <HP-HITS-stack>display ntp-service status
> HIT COMMAND:<HP-HITS-stack>display current-configuration
> In DisplayCurrent: <HP-HITS-stack>display current-configuration
> sw-hp-hits-stack: clean_run=1 found_end=1
>
>
> can anybody telle me where I'm wrong please ?

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss
Re: h3crancid problem [ In reply to ]
hi Heasley,
I don't understand why you talk about alteon.


tried to add that in rancid.types.conf

# HP Comware
h3c;alias;h3crancid
h3crancid;script;rancid -t h3crancid
h3crancid;login;h3clogin
h3crancid;module;h3crancid
h3crancid;inloop;h3crancid::inloop
h3crancid;command;h3crancid::DisplayCurrent;display current-configuration

but I get this error :
loadtype: undefined function in h3crancid: h3crancid::DisplayCurrent
Couldn't load device type spec for h3c

what I don't understand is why it works correctly wen calling :
PATH=$PATH:/usr/local/rancid/bin ./bin/h3crancid -d sw-hp-hits-stack -h


I found this too :
https://sites.google.com/site/jrbinks/code/rancid/cmwrancid but it's quite
old (2015)
Regards
Cédric

Regards

Le lun. 6 déc. 2021 à 19:22, heasley <heas@shrubbery.net> a écrit :

> Mon, Dec 06, 2021 at 10:46:39AM +0100, BASSAGET Cédric:
> > Hello,
> > I have a problem when trying to rancid h3c switches :
> >
> > rancid@jersey:~$ PATH=$PATH:/usr/local/rancid/bin ./bin/rancid -d -t h3c
> > sw-hp-hits-stack
> > loadtype: device type h3c
> > loadtype: found device type h3c at
> > /usr/local/rancid/etc/rancid.types.base:595
> > loadtype: found device type h3c aliased to h3crancid
> > loadtype: device type h3crancid
> > loadtype: found device type h3crancid at
> > /usr/local/rancid/etc/rancid.types.base:596
> > executing h3clogin -t 90 -c"" sw-hp-hits-stack
> > sw-hp-hits-stack: missed cmd(s): all commands
> > sw-hp-hits-stack: End of run not found
> > sw-hp-hits-stack: clean_run is false
> > sw-hp-hits-stack: found_end is false
> >
> >
> > I don't understand why the "-c" parameter is empty.
>
> An error in your rancid.types.conf file, I presume. It should resemble
> the built-in alteon device type spec. Maybe try one of the other built-in
> device types that most closely resemble your device?
>
> > when running directly h3crancid it works fine :
> > rancid@jersey:~$ PATH=$PATH:/usr/local/rancid/bin ./bin/h3crancid -d
> > sw-hp-hits-stack -h
> > executing h3clogin -t 20 -c"display version;display startup;dir /all
> > /all-filesystems;display device;display fan;display power;display
> > domain;display local-user;display ssh server status;display ntp-service
> > status;display current-configuration" sw-hp-hits-stack
> > PROMPT MATCH: <HP-HITS-stack>
> > HIT COMMAND:<HP-HITS-stack>display version
> > In CommentOutput: <HP-HITS-stack>display version
> > HIT COMMAND:<HP-HITS-stack>display startup
> > In CommentOutput: <HP-HITS-stack>display startup
> > HIT COMMAND:<HP-HITS-stack>dir /all /all-filesystems
> > In CommentOutput: <HP-HITS-stack>dir /all /all-filesystems
> > HIT COMMAND:<HP-HITS-stack>display device
> > In CommentOutput: <HP-HITS-stack>display device
> > HIT COMMAND:<HP-HITS-stack>display fan
> > In CommentOutput: <HP-HITS-stack>display fan
> > HIT COMMAND:<HP-HITS-stack>display power
> > In CommentOutput: <HP-HITS-stack>display power
> > HIT COMMAND:<HP-HITS-stack>display domain
> > In CommentOutput: <HP-HITS-stack>display domain
> > HIT COMMAND:<HP-HITS-stack>display local-user
> > In CommentOutput: <HP-HITS-stack>display local-user
> > HIT COMMAND:<HP-HITS-stack>display ssh server status
> > In CommentOutput: <HP-HITS-stack>display ssh server status
> > HIT COMMAND:<HP-HITS-stack>display ntp-service status
> > In CommentOutput: <HP-HITS-stack>display ntp-service status
> > HIT COMMAND:<HP-HITS-stack>display current-configuration
> > In DisplayCurrent: <HP-HITS-stack>display current-configuration
> > sw-hp-hits-stack: clean_run=1 found_end=1
> >
> >
> > can anybody telle me where I'm wrong please ?
>
Re: h3crancid problem [ In reply to ]
Tue, Dec 07, 2021 at 08:15:34AM +0100, BASSAGET C?dric:
> hi Heasley,
> I don't understand why you talk about alteon.

alteon is a rancid script that is not yet a perl module, like your h3crancid

> tried to add that in rancid.types.conf
>
> # HP Comware
h3c;alias;h3crancid
h3crancid;script;rancid -t h3crancid
h3crancid;script;h3crancid
h3crancid;login;h3clogin

_______________________________________________
Rancid-discuss mailing list
Rancid-discuss@www.shrubbery.net
https://www.shrubbery.net/mailman/listinfo/rancid-discuss