[rancid] RANCID no longer working with MikroTik RouterOS 6.49 and 7.1rc3 and 7.1rc4

Michael Ducharme mducharme at gmail.com
Fri Oct 15 20:39:18 UTC 2021


Hello,

I had a look at your patch and I'm not sure that would fix the issue. Also
show-sensitive only works with v7 and above and throws an error on RouterOS
v6.

Someone on the MikroTik forums found that there is no longer a newline
being generated after the output so the regexp doesn't match and so RANCID
no longer identifies the end of the command. You can see more detail here:
https://forum.mikrotik.com/viewtopic.php?t=179233#p885616

They came up with this patch to fix it and I confirmed that it works with
RouterOS v6.49 and v7. However I haven't tested with older RouterOS
versions, and I don't know if it might break something else:

--- /usr/libexec/rancid/mtrancid-orig       2021-10-14
03:44:22.102333666 +0200+++ /usr/libexec/rancid/mtrancid
2021-10-13 07:16:22.567538444 +0200@@ -348,7 +348,7 @@
        $clean_run=0;
        last;
     }-    while (/\s*($cmds_regexp)\s*$/) {+    while
(/\s*($cmds_regexp)\s*/) {
        $cmd = $1;
        if (!defined($prompt)) {
            $prompt = "\] > ";  # crude but effective


On Fri, Oct 15, 2021 at 1:20 PM heasley <heas at shrubbery.net> wrote:

> Mon, Oct 11, 2021 at 06:28:39PM -0700, Michael Ducharme:
> > Hello,
> >
> > I just wanted to let you know - on the MikroTik forum I am seeing reports
> > that RANCID is no longer working to back up RouterOS versions 6.49 and
> > 7.1rc3 and 7.1rc4. The commands still run and there were no documented
> > changes to the console or SSH on the MikroTik side recently, so I'm not
> > sure why this is happening suddenly. I was trying to go through the code
> to
> > see what the problem might be, but could not find anything.
> >
> > Please see this post for details on the error:
> > https://forum.mikrotik.com/viewtopic.php?p=885246#p885246
>
> Care to the attached patch?
>
> > I also tried loading up the output of the working 6.48.4 vs non-working
> > 6.49 into a hex editor to see if there were any unexpected characters
> being
> > added that might be confusing RANCID but did not find anything of note.
> It
> > looks pretty much the same to me.
>
> I have access to only one Mikrotik and its running an older O/S.  I've
> tested the patch against it.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20211015/34984b6c/attachment.htm>


More information about the Rancid-discuss mailing list