Closed elisiano closed 6 years ago
I will try the module with rancid 3 and post my results.
Did you have a chance to test this? It's a burden to remember not to upgrade the package when doing system upgrades :-)
The main issue with supporting 3.x is this change:
router.db,rancid.types.*: change field separator to ';' (semi-colon) to
allow for IPv6 addresses in router.db and avoid conflict with :s in
device commands and perl module names
If that's the only change, then the template could optionally use :
or ;
as appropriate. You might want a custom fact that gives you the rancid version.
Both RHEL 6 and 7 have rancid > 3.0 in their epel repos. Also, I've forked the module and modified it a little bit to support CentOS/RHEL 7 and rancid 3.2 If anyone's interested, I can open a new pull request as soon as all work is done & the module is tested?
@lemonsquash a pull request would be appreciated.
Ok, I will open it as soon I've tested the module and solved any bugs (if any ;) )
:+1:
@lemonsquash: I saw that in your fork you also add support for git (new in rancid 3.2) on top of rancid 3.x support! :+1: How far is a PR?
@elisiano: Sorry for the delay, I didn't had a chance to work on this in the last 3 weeks. I hope to get a hour left for fine tuning next week and will create a PR asap then.
@elisiano Unfortunately, I still didn't got some spare time for working on this. But the code should be already working (at least, it is here ;) ). So I will open a PR now to avoid further delays. If you find any errors or problems, please don't hesitate to tell me.
@lemonsquash: apologies for the delay but I had to solve an issue we had with foreman and environments before I could test this.
First of all thanks, this mostly works (except on the first run where it spit some errors but then eventually works). There's a couple of things that would need to be addressed:
The fix I applied in the router.db.erb is very simple: just sort the keys before looping over them. The following code is for the pre 3.X version so it still has the ':' instead of ';' but It should work
<%- @devices[@name].keys.sort.each do |key| -%>
<%=@devices[@name][key]['hostname']-%>:<%=@devices[@name][key]['type']-%>:<%=@devices[@name][key]['status']-%>
<%- end -%>
Apologies for not opening a PR but I'm extremely swamped at the moment (but I still wanted to give some feedback).
Thanks!
And also cvsroot it doesn't seem to be used (the template reference a "@cvsdir" which is uninitialized).
I'm closing this as it's no more relevant to me. Feel free to reopen for whatever reason.
I'm running against rancid 3.13, and the issue definitely exists. Please could this issue be reopened. I'm happy to contribute a PR. Do we still need to support versions < 3.x ?
I had recently to re-install one of our rancid servers and I noticed that all routers were reported as down. After a bit of digging I am still unclear where the problem lies. I noticed that /usr/libexec/rancid/control_rancid changes the logic/format of temporary files, but the original router.db has still the same format.
Did anyone successfully use this module with rancid 3.X?