Discussion:
[rancid] debug and empty config issue
Konstantin Yudayev
2010-01-06 18:20:35 UTC
Permalink
Hello,

I've recently enabled bug in all bin/*rancid* ($debug = 1) and looks
like there is an issue with unaccessible devices. If a device is not
currently available the rancid produces following output in the config
file (that is a whole file for every "offline" router):

!RANCID-CONTENT-TYPE: erx (or whatever vendor is)
!
!
!
!

This is obviously a problem because it replaces the existing config with
this output and once router is back online the actual config will
replace this file.

I need an advice on how this can be fixed and offline devices will be
skipped the same way as when debug is disabled.

thank you

- Konstantin
john heasley
2010-01-06 19:27:33 UTC
Permalink
Post by Konstantin Yudayev
Hello,
I've recently enabled bug in all bin/*rancid* ($debug = 1) and looks
like there is an issue with unaccessible devices. If a device is not
currently available the rancid produces following output in the config
!RANCID-CONTENT-TYPE: erx (or whatever vendor is)
!
!
!
!
This is obviously a problem because it replaces the existing config with
this output and once router is back online the actual config will
replace this file.
I need an advice on how this can be fixed and offline devices will be
skipped the same way as when debug is disabled.
remove the lines
unlink "$host.new" if (! $debug);
Post by Konstantin Yudayev
thank you
- Konstantin
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo.cgi/rancid-discuss
Konstantin Yudayev
2010-01-12 17:07:23 UTC
Permalink
Now it creates those semi-empty files even if debug is off. I think we
need to remove "$host.new" if run has failed regardless of $debug but I
am not sure what would happened if I leave unconditional `unlink
"$host.new"`. Please advise.

- Konstantin
Post by john heasley
Post by Konstantin Yudayev
Hello,
I've recently enabled bug in all bin/*rancid* ($debug = 1) and looks
like there is an issue with unaccessible devices. If a device is not
currently available the rancid produces following output in the config
!RANCID-CONTENT-TYPE: erx (or whatever vendor is)
!
!
!
!
This is obviously a problem because it replaces the existing config with
this output and once router is back online the actual config will
replace this file.
I need an advice on how this can be fixed and offline devices will be
skipped the same way as when debug is disabled.
remove the lines
unlink "$host.new" if (! $debug);
Loading...