hillscott / rancid-edgeos

A fork of https://bitbucket.org/aquerubin/rancid-vyatta - with slight modifications for ubiquiti's EdgeOS
GNU General Public License v2.0
4 stars 4 forks source link

Undesired chronic intermittent "show version" first-command changes #1

Open jmswoc opened 6 years ago

jmswoc commented 6 years ago

I am using your RANCID scripts against a number of different Ubiquiti EdgeMax router models all running v1.9.1.1 and am having a problem where undesired false changes are being reported.

I will often get a change notice like this:

- # myhost:~$ show version|egrep -v ^Uptime:|no-more
+ # show version|egrep -v ^Uptrancid@myhost:~$ show version|egrep -v ^Uptime:|no-more

And then on the next run, it will flip back:

- # show version|egrep -v ^Uptrancid@myhost:~$ show version|egrep -v ^Uptime:|no-more
+ # myhost:~$ show version|egrep -v ^Uptime:|no-more

It's notable that this is the first command and that I've not seen any similar problems with later commands, such as "show configuration". I suspect this is an issue with the first command run, but I'm not certain of that. Seems like a race with their command interpreter not being ready yet; something that a sleep 0.2 might fix.

The problem is easy to reproduce, but is intermittent. Running vlogin manually in a loop will result in this error once in every 10-20 runs:

/srv/rancid/bin/vlogin -c "show version all | egrep -v ^Uptime: | no-more" myhost

Here's a quick bash loop. Run this for a few minutes and then flip through the results:

while true ; do /srv/rancid/bin/vlogin -c "show version all | egrep -v ^Uptime: | no-more" myhost > vlogin.out-$(date +%Y%m%d%H%M%S) ; sleep 1 ; done

I am surprised if nobody else has run into this because it's easy to reproduce and I don't think we are doing anything special which might be a factor.

Please advise.

jmswoc commented 6 years ago

Quick observation that the lack of the "egrep -v ^Uptime: " in the examples is a pretty strong indication that nobody uses this.

Also the maintainer is probably dead. His personal website is dead and he has no changes to any of his repos in over a year.

It's looking like it's time to move to Oxydized.