Discussion:
[rancid] rancid not writting configurations to /config/ file
Erica James
2013-09-12 08:08:38 UTC
Permalink
hello there!
 
I am facing a problem with rancid, please kindly advise. I am adding a Huawei MA5600T device to rancid, but rancid does not write configurations to the /config/  file.This is the only output I am getting in the file.
 
[***@netflow configs]$ ls
10.3.4.5  CVS
[***@netflow configs]$ less 10.3.4.5
# RANCID-CONTENT-TYPE: Huawei
#
 
and with the logs,
 
Trying to get all of the configs.
10.3.4.5: missed cmd(s): display current-configuration,display version
10.3.4.5: End of run not found
#
All routers sucessfully completed.
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
 
 
Does it have anything to do with the "missed cmds"? What about the end of run. I have checked out suggestions from the forum plus the FAQs but none has proved success.
 
Can someone advise please.  I am currently using hulogin and hurancid scripts. Take a look at them
 
https://github.com/ssinyagin/rancid-ssi/blob/master/bin/hulogin.in

https://github.com/ssinyagin/rancid-ssi/blob/master/bin/hurancid.in
 
Thanks in advance
 
Eserica
Alan McKinnon
2013-09-12 09:06:12 UTC
Permalink
Post by Erica James
hello there!
I am facing a problem with rancid, please kindly advise. I am adding a
Huawei MA5600T device to rancid, but rancid does not write
configurations to the /config/ file.This is the only output I am
getting in the file.
10.3.4.5 CVS
# RANCID-CONTENT-TYPE: Huawei
#
and with the logs,
Trying to get all of the configs.
10.3.4.5: missed cmd(s): display current-configuration,display version
10.3.4.5: End of run not found
#
All routers sucessfully completed.
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
Does it have anything to do with the "missed cmds"? What about the end
of run. I have checked out suggestions from the forum plus the FAQs but
none has proved success.
"missed commands" means that the rancid parser looked for the output of
those two commands, but did not find it for whatever reason. It's a
general type of error message and all you know at this point is that
something went wrong.

"end of run not found" means exactly that - the parser looked for some
text pattern that indicates all the text above it was processed
correctly and the end happened exactly where it was expected to end.
Again, we know something went wrong but have no idea what.

I don't have the hu* scripts, but I assume they are forked from the
original rancid scripts?

Run "hurancid -d <router name>", that should dump the entire raw output
into the current directory and you can manually go through it to figure
out what went wrong.

Consider how rancid must work - it receives many lines of unstructured
text that hopefully follow and expected pattern. It has to identify the
prompt character, match the command entered later on that line, and
process every line after it until it sees a prompt again, then repate
for the next command. It's all driven by regular expressions and if one
line does not match in the expected way it can throw out everything that
follows. Plus, we have vendors who change the formatting of the output
almost on a whim sometimes...

There's no stock answer to the problem you have, it really does take
eyeballs on the text to figure it out.
Post by Erica James
Can someone advise please. I am currently using hulogin and hurancid
scripts. Take a look at them
https://github.com/ssinyagin/rancid-ssi/blob/master/bin/hulogin.in
https://github.com/ssinyagin/rancid-ssi/blob/master/bin/hurancid.in
Thanks in advance
Eserica
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Alan McKinnon
***@gmail.com
Sean Maguire
2013-09-12 14:59:42 UTC
Permalink
Post by Alan McKinnon
Post by Erica James
hello there!
I am facing a problem with rancid, please kindly advise. I am adding a
Huawei MA5600T device to rancid, but rancid does not write
configurations to the /config/ file.This is the only output I am
getting in the file.
10.3.4.5 CVS
# RANCID-CONTENT-TYPE: Huawei
#
and with the logs,
Trying to get all of the configs.
10.3.4.5: missed cmd(s): display current-configuration,display version
10.3.4.5: End of run not found
#
All routers sucessfully completed.
cvs diff: Diffing .
cvs diff: Diffing configs
cvs commit: Examining .
cvs commit: Examining configs
Does it have anything to do with the "missed cmds"? What about the end
of run. I have checked out suggestions from the forum plus the FAQs but
none has proved success.
"missed commands" means that the rancid parser looked for the output of
those two commands, but did not find it for whatever reason. It's a
general type of error message and all you know at this point is that
something went wrong.
"end of run not found" means exactly that - the parser looked for some
text pattern that indicates all the text above it was processed
correctly and the end happened exactly where it was expected to end.
Again, we know something went wrong but have no idea what.
I don't have the hu* scripts, but I assume they are forked from the
original rancid scripts?
Run "hurancid -d <router name>", that should dump the entire raw output
into the current directory and you can manually go through it to figure
out what went wrong.
Consider how rancid must work - it receives many lines of unstructured
text that hopefully follow and expected pattern. It has to identify the
prompt character, match the command entered later on that line, and
process every line after it until it sees a prompt again, then repate
for the next command. It's all driven by regular expressions and if one
line does not match in the expected way it can throw out everything that
follows. Plus, we have vendors who change the formatting of the output
almost on a whim sometimes...
There's no stock answer to the problem you have, it really does take
eyeballs on the text to figure it out.
Post by Erica James
Can someone advise please. I am currently using hulogin and hurancid
scripts. Take a look at them
https://github.com/ssinyagin/rancid-ssi/blob/master/bin/hulogin.in
https://github.com/ssinyagin/rancid-ssi/blob/master/bin/hurancid.in
Thanks in advance
Eserica
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Alan McKinnon
_______________________________________________
Post by Alan McKinnon
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
I think you are going to struggle getting the Huawei 5600 to back up
correctly in RANCID I'm afraid. The problem with Huawei is that they have
very different CLIs across their product range. In fact, on their MSANs you
see significant differences between the CLI of the data cards and the voice
cards and neither of these have a CLI which is the same the that on their
switches or firewalls. I suspect the RANCID script you are using was
designed for switches and firewalls rather than the 5600 DSLAM. Some of the
major differences are how the CLI handles things like turning off paging (I
seem to remember at least some of their kit not supporting disabling
paging) and the string that is output to inform the user of the end of a
page (which RANCID uses internally if paging support cannot be disabled). I
also seem to remember the DSLAMs spitting out all kinds of horrible control
character which make your RANCID backups look a total mess. We've been
through this process where I work and in the end we decided to just give up
on the idea of using RANCID to backup the Huawei DSLAMs and MSANs and
backed up the configs to a TFTP server instead (I think that's the only
server type they supported on the code we run). Unless you are fairly handy
at perl and tcl or know someone who is and have time to spend a lot of time
digging around in the code for the plugin, I'd suggest doing the same to
save yourself some massive headaches!
Jethro R Binks
2013-09-12 23:49:58 UTC
Permalink
Post by Sean Maguire
I think you are going to struggle getting the Huawei 5600 to back up
correctly in RANCID I'm afraid. The problem with Huawei is that they
have very different CLIs across their product range. In fact, on their
MSANs you see significant differences between the CLI of the data cards
and the voice cards and neither of these have a CLI which is the same
the that on their switches or firewalls. I suspect the RANCID script you
are using was designed for switches and firewalls rather than the 5600
DSLAM.
There may be a little hope; my h3c scripts have been tested on some Huawei
kit, and I was sent a few modifications which improve support on at least
the MA5600.

I was not aware of the github.com/ssinyagin stuff, so I do not know if
there are any parts of that that may be useful.
Post by Sean Maguire
Some of the major differences are how the CLI handles things like
turning off paging (I seem to remember at least some of their kit not
supporting disabling paging) and the string that is output to inform the
user of the end of a page (which RANCID uses internally if paging
support cannot be disabled). I also seem to remember the DSLAMs spitting
out all kinds of horrible control character which make your RANCID
backups look a total mess.
There are some features in the patch I was sent that may address these
issues.

I've been meaning to merge them and some other bits in for a while but
never found the time so far. Unfortunately, I do not have access to any
5600 to test :)

Maybe more news on this soon.

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.
Erica James
2013-09-13 06:46:20 UTC
Permalink
I have the h3c* scripts Jethro, made a few changes on the h3clogin and I observe the below
 
can login: /home/eserica/rancid/bin/h3clogin 10.3.4.5, successfully
 
but /home/eserica/rancid/bin/h3clogin -t 90 -c "display current-configuration" 10.3.4.5 just hangs in the privilege exec mode.
 
On the other hand, the h3crancid gives the below
 
[***@netflow ~]$ /home/eserica/rancid/bin/h3crancid -d 10.3.4.5
executing hulogin -t 90 -c"display current-configuration" 10.3.4.5
sh: hulogin: command not found
10.3.4.5: missed cmd(s): display current-configuration
10.3.4.5: missed cmd(s): display current-configuration
10.3.4.5: End of run not found
10.3.4.5: End of run not found  
 
 What else should I do regarding the above? May you kindly share with me the patch for this device.
 
Eserica
 
 

________________________________
From: Jethro R Binks <***@strath.ac.uk>
To: rancid-***@shrubbery.net
Sent: Friday, September 13, 2013 2:49 AM
Subject: Re: [rancid] rancid not writting configurations to /config/ file
Post by Sean Maguire
I think you are going to struggle getting the Huawei 5600 to back up
correctly in RANCID I'm afraid. The problem with Huawei is that they
have very different CLIs across their product range. In fact, on their
MSANs you see significant differences between the CLI of the data cards
and the voice cards and neither of these have a CLI which is the same
the that on their switches or firewalls. I suspect the RANCID script you
are using was designed for switches and firewalls rather than the 5600
DSLAM.
There may be a little hope; my h3c scripts have been tested on some Huawei
kit, and I was sent a few modifications which improve support on at least
the MA5600.

I was not aware of the github.com/ssinyagin stuff, so I do not know if
there are any parts of that that may be useful.
Post by Sean Maguire
Some of the major differences are how the CLI handles things like
turning off paging (I seem to remember at least some of their kit not
supporting disabling paging) and the string that is output to inform the
user of the end of a page (which RANCID uses internally if paging
support cannot be disabled). I also seem to remember the DSLAMs spitting
out all kinds of horrible control character which make your RANCID
backups look a total mess.
There are some features in the patch I was sent that may address these
issues.

I've been meaning to merge them and some other bits in for a while but
never found the time so far.  Unfortunately, I do not have access to any
5600 to test :)

Maybe more news on this soon.

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.
Jethro R Binks
2013-09-13 06:50:14 UTC
Permalink
Post by Erica James
I have the h3c* scripts Jethro, made a few changes on the h3clogin and I observe the below
 
can login: /home/eserica/rancid/bin/h3clogin 10.3.4.5, successfully
 
but /home/eserica/rancid/bin/h3clogin -t 90 -c "display current-configuration" 10.3.4.5 just hangs in the privilege exec mode.
 
On the other hand, the h3crancid gives the below
 
executing hulogin -t 90 -c"display current-configuration" 10.3.4.5
sh: hulogin: command not found
10.3.4.5: missed cmd(s): display current-configuration
10.3.4.5: missed cmd(s): display current-configuration
You need to modify h3crancid to call h3clogin, not hulogin.

I am not that hopeful that the version you are using will help though, I
will try and get something better to you soon.

Jethro.
Post by Erica James
10.3.4.5: End of run not found
10.3.4.5: End of run not found  
 
 What else should I do regarding the above? May you kindly share with me the patch for this device.
 
Eserica
 
 
________________________________
Sent: Friday, September 13, 2013 2:49 AM
Subject: Re: [rancid] rancid not writting configurations to /config/ file
Post by Sean Maguire
I think you are going to struggle getting the Huawei 5600 to back up
correctly in RANCID I'm afraid. The problem with Huawei is that they
have very different CLIs across their product range. In fact, on their
MSANs you see significant differences between the CLI of the data cards
and the voice cards and neither of these have a CLI which is the same
the that on their switches or firewalls. I suspect the RANCID script you
are using was designed for switches and firewalls rather than the 5600
DSLAM.
There may be a little hope; my h3c scripts have been tested on some Huawei
kit, and I was sent a few modifications which improve support on at least
the MA5600.
I was not aware of the github.com/ssinyagin stuff, so I do not know if
there are any parts of that that may be useful.
Post by Sean Maguire
Some of the major differences are how the CLI handles things like
turning off paging (I seem to remember at least some of their kit not
supporting disabling paging) and the string that is output to inform the
user of the end of a page (which RANCID uses internally if paging
support cannot be disabled). I also seem to remember the DSLAMs spitting
out all kinds of horrible control character which make your RANCID
backups look a total mess.
There are some features in the patch I was sent that may address these
issues.
I've been meaning to merge them and some other bits in for a while but
never found the time so far.  Unfortunately, I do not have access to any
5600 to test :)
Maybe more news on this soon.
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.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
. . . . . . . . . . . . . . . . . . . . . . . . .
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.

Tom Limoncelli
2013-09-12 17:47:34 UTC
Permalink
Post by Alan McKinnon
"missed commands" means that the rancid parser looked for the output of
those two commands, but did not find it for whatever reason. It's a
general type of error message and all you know at this point is that
something went wrong.
"end of run not found" means exactly that - the parser looked for some
text pattern that indicates all the text above it was processed
correctly and the end happened exactly where it was expected to end.
Again, we know something went wrong but have no idea what.
I don't have the hu* scripts, but I assume they are forked from the
original rancid scripts?
Run "hurancid -d <router name>", that should dump the entire raw output
into the current directory and you can manually go through it to figure
out what went wrong.
Consider how rancid must work - it receives many lines of unstructured
text that hopefully follow and expected pattern. It has to identify the
prompt character, match the command entered later on that line, and
process every line after it until it sees a prompt again, then repate
for the next command. It's all driven by regular expressions and if one
line does not match in the expected way it can throw out everything that
follows. Plus, we have vendors who change the formatting of the output
almost on a whim sometimes...
There's no stock answer to the problem you have, it really does take
eyeballs on the text to figure it out.
This is a great description. Can someone add it to the FAQ?

Tom
Loading...