[rancid] Spurious diffs on VyOS
heasley
heas at shrubbery.net
Wed Jul 6 17:34:02 UTC 2022
Tue, Jul 05, 2022 at 09:52:22AM -0500, Adam Korab:
> Working on a problem where spurious diffs are received by
> rancid (3.13) when executing against a VyOS VM (v1.3.1-S1).
>
> Given the order of commands here:
>
> executing vlogin -t 120 -c"show hardware cpu;show hardware dmi;show hardware pci;show hardware scsi;show hardware usb;show system routing-daemons;show system image;show version all;show configuration;show configuration commands" r20.stlsmo03.mid.net
>
> it looks to me like sometimes 'show hardware pci' is firing before all the
> output from 'show hardware dmi' has completed, resulting in the diff.
> Perhaps worth noting is that bios_date is the first line returned from 'show
> hardware dmi'
>
> Further interesting is that this VM is one of several that rancid tracks,
> all running an identical VyOS image - but it's the only one that exhibits
> this behavior - even when the output of 'show hardware dmi' is 100%
> identical between VMs.
>
> My hunch is that this may be something within vlogin that is not (always)
> waiting for the prompt to return before firing the next command, but that's
> the point where I need help. I realize I could probably just comment out the
> two commands in vyos.pm because they really shouldn't change much on a VM,
> but given that VyOS could also be a hardware appliance, that certainly seems
> like the wrong way to solve the problem.
I do not have a copy of vlogin. Ensure that it is finding the complete
prompt after it successfully logs into the device. The login scripts
generally use a loose prompt match first, then once logged-in, send a
return to generate a new prompt and create a more exact prompt match
regex based on what is received.
Also, look at the preceding output. vlogin might have become out of
sync with the prompts in output prior to the show hardware dmi command.
This is where the -d option (if vlogin supports it) helps, though it can
be rather ugly.
More information about the Rancid-discuss
mailing list