[rancid] Dell N3048P, End of run not found. Regex issue?

Henrik Cednert (Filmlance) henrik.cednert at filmlance.se
Wed Jun 23 19:53:38 UTC 2021


Hello

Accidently missed the proper rancid-dicuss email in my first answer, sorry for that.

As seen in the following posts I got it to work. But I will post those details here if someone else has the same problem and runs into this thread. This is probably not the best solution nor good practice. But it works for us so I'll keep it like this, there are funnier things to do in life then mess with rancid configs. =)

 In addition to the other posts with the solution to my problem this is how my config looks like:

/var/lib/rancid/observium/router.db
jg-dsw01;neo-dell;up

/var/lib/rancid/.cloginrc
add method jg-dsw01 ssh
add autoenable jg-dsw01 0
add user jg-dsw01 username
add password jg-dsw01 password

/etc/rancid/rancid.types.conf
neo-dell;script;neo-jgdsw01-trancid
neo-dell;login;clogin
neo-dell;module;nxos
neo-dell;inloop;nxos::inloop
neo-dell;command;nxos::ShowVersion;show version
neo-dell;command;nxos::WriteTerm;show running-config


And the changes I've done in neo-jgdsw01-trancid compared to vanilla trancid was described in previous post. Without those changed it will NOT work.

So, with all this it works. Probably not correct. But it works and life goes on. =)

cheers

--
Henrik


________________________________
From: heasley <heas at shrubbery.net>
Sent: 23 June 2021 21:30
To: Henrik Cednert (Filmlance) <henrik.cednert at filmlance.se>
Cc: rancid-discuss at shrubbery.net <rancid-discuss at shrubbery.net>
Subject: Re: [rancid] Dell N3048P, End of run not found. Regex issue?

Wed, Jun 23, 2021 at 08:34:25AM +0000, Henrik Cednert (Filmlance):
> Hi there
>
> trying to get Rancid to work with a Dell N3048P. I'm running into probably the very same issues as here.
> https://shrubbery.net/pipermail/rancid-discuss/2015-June/008426.html
>
> During troubleshooting I have followed the steps in the FAQ (https://shrubbery.net/rancid/FAQ).
>
> I have tried my best to get it to work and I've tried alot so I might miss a few things here in this post.
>
> I've concluded that tlogin works fine for the login procedure, I've landed in that since that one has the same WHILE as described in the post above. Making it somewhat easier for me to modify:
> bin/tlogin jg-dsw01
> jg-dsw01
> spawn ssh -x -l rancid jg-dsw01
> rancid at jg-dsw01's password:
>
> JG-DSW01>enable
>
> JG-DSW01#
> JG-DSW01#
>
>
> I think the problem boils down to the exit "procedure" here.
> JG-DSW01#exit
>
> JG-DSW01>exitConnection to jg-dsw01 closed.
>
>
> When looking at the hostname.raw it looks like this:
> eula-consent support-assist reject
> eula-consent hiveagent reject
> exit
>
> JG-DSW01#exit
>
> JG-DSW01>exitConnection to jg-dsw01 closed.^M
>
>
> So with that I thought that I need to modify the 'trandic' script, which I did. I copied it to a new name and modified the original 'if' line that would give a clean_run=1. Sadly, I'm horrible at regex but I've used a few online tools to verify the expression. I also added a PRINT line inside that scope so I would see if it went into it or not.

Hi.  What device type are you using for this device in your router.db
configuration file?  I am not familiar with the N3048, but it looks like
it is just a switch.  So, I would expect it to be device type 'dell' or
'smc'.  Could you try one of those?

> Original:
> if (/[>#]\s?exit$/) {
>
> Current:
> if (/[>#]\s?exit.*$/) {
>
> I've tried others more loose as well but nothing makes it go into that 'if' when I run it.
>
> rancid at m5-server08:~$ bin/neo-jgdsw01-trancid -d jg-dsw01
> executing tlogin -t 90 -c"show running-config" jg-dsw01
> PROMPT MATCH: #
> HIT COMMAND:JG-DSW01#show running-config
>     In ShowConfig: JG-DSW01#show running-config
> jg-dsw01: End of run not found
> jg-dsw01: clean_run is false
> jg-dsw01: found_end is false
> JG-DSW01>exitConnection to jg-dsw01 closed.
> rancid at m5-server08:~$
>
>
> I'm new to rancid and I honeslty have no idea where to go from here.
>
> Does anyone have any pointers here? Any help greatly appreciated. Thanks.
>
>
> --
>
> Henrik
>
>
> Disclaimer
>
> This e-mail, its contents and any files transmitted with it are confidential and may be legally privileged. It is intended solely for the addressee(s) only. If you are not the intended recipient, you must not copy, distribute, or take any action in reliance upon it. If you have received this e-mail in error, please notify us immediately and delete the material from your computer system. If you are an individual, you are hereby informed that Banijay companies as data controllers are, in accordance with the General Data Protection Regulation ("GDPR"), processing and disclosing your personal data in the carrying out of its business, including, where appropriate, transferring personal data outside the European Union/EEA-area and transferring personal data to other entities within the Banijay group for their own processing as data controllers. If you are an individual, you retain all of your rights under the GDPR and may send any GDPR-related inquiries to the respective Banijay company.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20210623/ce1e87ad/attachment.htm>


More information about the Rancid-discuss mailing list