Discussion:
[rancid] All routers showing as down
Nick Hollingsworth
2009-11-12 06:21:19 UTC
Permalink
Hi Rancid subscribers,

Rancid has been doing a great job keeping track of configs & diffs, thanks very much.

I started having problems with it a couple of weeks ago after an admin updated routers.db (I think this is all they did). I rang the admin and confirmed they did it by:

* logging into the Rancid linux host as root
* scp'd router.db off
* modified it
* scp'd it back on (as root)

Now all the routers end up as down after every rancid run (routers.all & routers.down are full, routers.up is empty, no configs are taken, no diffs given).

I noticed that routers.db had owner root, group root. I presumed this was due to the admin scp'ing the routers.db file back to the system after modifying it so I chowned it back to rancid:netadm.

Other than that I can't see anything wrong .... bin/clogin works fine on a few of the devices ...... I run bin/rancid-run and it finishes instantly leaving an empty log file:

starting: Thu Nov 12 16:26:22 WST 2009




ending: Thu Nov 12 16:26:23 WST 2009

I can see router.db in cvs status and if I modify router.db cvs picks it up.

Any ideas what might be going wrong?

Regards,
Nick


Alphawest Disclaimer

If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments.
This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.
If you have received this email in error, we request you contact Alphawest immediately by returning the email to ***@alphawest.com.au and destroy the original.
This email is confidential and may contain privileged client information.
Alphawest has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers from time to time in accordance with its privacy policy located on www.alphawest.com.au.
john heasley
2009-11-12 08:33:41 UTC
Permalink
Post by Nick Hollingsworth
Hi Rancid subscribers,
Rancid has been doing a great job keeping track of configs & diffs, thanks very much.
* logging into the Rancid linux host as root
* scp'd router.db off
* modified it
* scp'd it back on (as root)
dollars to donuts; they edited it on a winblows host and it now has winblows
line terminators.
Post by Nick Hollingsworth
Now all the routers end up as down after every rancid run (routers.all & routers.down are full, routers.up is empty, no configs are taken, no diffs given).
I noticed that routers.db had owner root, group root. I presumed this was due to the admin scp'ing the routers.db file back to the system after modifying it so I chowned it back to rancid:netadm.
starting: Thu Nov 12 16:26:22 WST 2009
ending: Thu Nov 12 16:26:23 WST 2009
I can see router.db in cvs status and if I modify router.db cvs picks it up.
Any ideas what might be going wrong?
Regards,
Nick
Alphawest Disclaimer
If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments.
This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.
This email is confidential and may contain privileged client information.
Alphawest has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers from time to time in accordance with its privacy policy located on www.alphawest.com.au.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
alex dekker
2009-11-12 09:25:13 UTC
Permalink
Post by john heasley
Post by Nick Hollingsworth
* logging into the Rancid linux host as root
* scp'd router.db off
* modified it
* scp'd it back on (as root)
dollars to donuts; they edited it on a winblows host and it now has
winblows line terminators.
If you open it in Vim, it will tell you what type of file it is on the status
line at the bottom. Also, check the permissions/ownership of the file.

alexd
Nick Hollingsworth
2009-11-13 03:59:55 UTC
Permalink
-----Original Message-----
Sent: Thursday, 12 November 2009 17:25
Subject: [rancid] Re: All routers showing as down
Post by john heasley
Post by Nick Hollingsworth
* logging into the Rancid linux host as root
* scp'd router.db off
* modified it
* scp'd it back on (as root)
dollars to donuts; they edited it on a winblows host and it now has
winblows line terminators.
If you open it in Vim, it will tell you what type of file it is on the status
line at the bottom. Also, check the permissions/ownership of the file.
alexd
You nailed it Alex and John - file was in DOS format. Solved it with:

:set ff=unix

Now I need to figure out a way for the admins to modify the file without changing the format. I did some tests - rancid doesn't seem to mind if root owns router.db or that router.db group is root.

So I just need to figure out the optimal way for the admins to edit the file irrelevant of what user they are.

I've also tested the various file formats outputted by Windows editors when opened on a Red Hat machine:

* notepad, default save, WinSCP upload - unix
* notepad, default save, opened from linux VM - DOS
* wordpad, any save, WinSCP upload - DOS

I'm loath to make the admins SSH to the Red Hat box & use Vi or Nano....notepad & WinSCP it is.

Thanks for your help Alex & John.

Regards,
Nick


Alphawest Disclaimer

If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments.
This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.
If you have received this email in error, we request you contact Alphawest immediately by returning the email to ***@alphawest.com.au and destroy the original.
This email is confidential and may contain privileged client information.
Alphawest has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers from time to time in accordance with its privacy policy located on www.alphawest.com.au.
David Croft
2009-11-13 07:45:57 UTC
Permalink
In WinSCP, when copying the file in either direction, just select
Transfer Settings -> Text.

You could also make this happen automatically by going to Options ->
Preferences -> Transfer -> Presets -> Text -> Edit -> "Automatically
select this preset when", and enter your server hostname and directory
there.

Or by Options -> Preferences -> Transfer -> Transfer mode -> Automatic
and add "; router.db" to that list.

David
-----Original Message-----
Sent: Thursday, 12 November 2009 17:25
Subject: [rancid] Re: All routers showing as down
Post by john heasley
 * logging into the Rancid linux host as root
 * scp'd router.db off
 * modified it
 * scp'd it back on (as root)
dollars to donuts; they edited it on a winblows host and it now has
 winblows line terminators.
If you open it in Vim, it will tell you what type of file it is on the status
line at the bottom. Also, check the permissions/ownership of the file.
alexd
       :set ff=unix
Now I need to figure out a way for the admins to modify the file without changing the format.  I did some tests - rancid doesn't seem to mind if root owns router.db or that router.db group is root.
So I just need to figure out the optimal way for the admins to edit the file irrelevant of what user they are.
  * notepad, default save, WinSCP upload - unix
  * notepad, default save, opened from linux VM - DOS
  * wordpad, any save, WinSCP upload - DOS
I'm loath to make the admins SSH to the Red Hat box & use Vi or Nano....notepad & WinSCP it is.
Thanks for your help Alex & John.
Regards,
Nick
Alphawest Disclaimer
If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments.
This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.
This email is confidential and may contain privileged client information.
Alphawest has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers from time to time in accordance with its privacy policy located on www.alphawest.com.au.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
john heasley
2009-11-13 08:58:21 UTC
Permalink
Post by Nick Hollingsworth
-----Original Message-----
Sent: Thursday, 12 November 2009 17:25
Subject: [rancid] Re: All routers showing as down
Post by john heasley
Post by Nick Hollingsworth
* logging into the Rancid linux host as root
* scp'd router.db off
* modified it
* scp'd it back on (as root)
dollars to donuts; they edited it on a winblows host and it now has
winblows line terminators.
If you open it in Vim, it will tell you what type of file it is on the status
line at the bottom. Also, check the permissions/ownership of the file.
alexd
:set ff=unix
Now I need to figure out a way for the admins to modify the file without changing the format. I did some tests - rancid doesn't seem to mind if root owns router.db or that router.db group is root.
So I just need to figure out the optimal way for the admins to edit the file irrelevant of what user they are.
* notepad, default save, WinSCP upload - unix
* notepad, default save, opened from linux VM - DOS
* wordpad, any save, WinSCP upload - DOS
I'm loath to make the admins SSH to the Red Hat box & use Vi or Nano....notepad & WinSCP it is.
Thanks for your help Alex & John.
Regards,
Nick
Alphawest Disclaimer
If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments.
This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.
This email is confidential and may contain privileged client information.
Alphawest has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers from time to time in accordance with its privacy policy located on www.alphawest.com.au.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Nick Hollingsworth
2009-11-17 00:17:41 UTC
Permalink
Post by Nick Hollingsworth
Post by Nick Hollingsworth
:set ff=unix
Now I need to figure out a way for the admins to modify the file without changing
the format. I did some tests - rancid doesn't seem to mind if root owns router.db or
that router.db group is root.
As in:

10.4.1.2:cisco:up:

?


Alphawest Disclaimer

If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments.
This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information.
If you have received this email in error, we request you contact Alphawest immediately by returning the email to ***@alphawest.com.au and destroy the original.
This email is confidential and may contain privileged client information.
Alphawest has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted.
Alphawest collects, uses and stores information regarding its customers from time to time in accordance with its privacy policy located on www.alphawest.com.au.
Loading...