Discussion:
[rancid] Issues with f5rancid
Derek Andree
2009-06-23 18:01:44 UTC
Permalink
Has anyone noticed issues getting the configuration for the standby F5 in an
HA pair? What is strange is that I can do rancid-run from the command line
and it will actually get the configuration fine. When run from cron, it
does not. I created a "rancid-daemon" which does rancid-run every hour and
just kicked that off in the background, but interestingly it succeeds the
first run, then every run thereafter fails for only the standby F5s.

My initial thoughts were that there was some problem with the prompt for the
standby, as it's prompt contains "Standby" instead of "Active", but when I
realized I could successfully get the configuration by running rancid-run
from the command line I abandoned this theory.

The only thing I can think of now is that it has to do with some environment
variable getting monkeyed up after the first run. I've noticed in f5rancid
it sets env{TERM} = 'vt100'. If I comment out that line f5rancid fails for
both active and standby F5 load balancers. I've even tried exporting
TERM=vt100 in the crontab such as this:

1 * * * * export TERM=vt100 ; /home/rancid/bin/rancid-run

This doesn't help.

If anyone has any ideas I'm all ears at this point, I'm about to re-write
f5rancid if I can't figure this out.

Here's the logfile when it fails (not very helpful), if there is any other
info that would be helpful please let me know and I will post it.

Trying to get all of the configs.
lb02: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls
--full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 1.
lb02: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls
--full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 2.
lb02: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls
--full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 3.
lb02: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls
--full-time --color=never /config/ssl/ssl.key
=====================================
Getting missed routers: round 4.
lb02: missed cmd(s): ls --full-time --color=never /config/ssl/ssl.crt,ls
--full-time --color=never /config/ssl/ssl.key

Thanks,
-Derek
Anthony Tonns
2009-06-24 15:19:09 UTC
Permalink
Post by Derek Andree
If anyone has any ideas I'm all ears at this point, I'm about to re-write
f5rancid if I can't figure this out.
I noticed the same problem. I just "tweaked" the f5rancid script to get
around it.

Tony

---8<---
$ diff -u f5rancid.orig f5rancid
--- f5rancid.orig 2008-12-12 12:30:01.000000000 -0500
+++ f5rancid 2008-12-12 12:59:49.000000000 -0500
@@ -545,8 +545,8 @@
{'bigpipe base list' => 'ShowBaseRun'},
{'bigpipe db show' => 'ShowDb'},
{'bigpipe route static show' => 'ShowRouteStatic'},
- {'ls --full-time --color=never /config/ssl/ssl.crt' =>
'ShowSslCrt'},
- {'ls --full-time --color=never /config/ssl/ssl.key' =>
'ShowSslKey'},
+# {'/bin/ls --full-time --color=never /config/ssl/ssl.crt'
=> 'ShowSslCrt'},
+# {'/bin/ls --full-time --color=never /config/ssl/ssl.key'
=> 'ShowSslKey'},
{'bigpipe list' => 'WriteTerm'}
);
# Use an array to preserve the order of the commands and a hash for
mapping
Derek Andree
2009-06-24 18:48:38 UTC
Permalink
This has fixed the issue, although I'm not sure I understand why these
commands only appear to affect the Standby F5 devices we have.

Thanks for the help!
Post by Anthony Tonns
I noticed the same problem. I just "tweaked" the f5rancid script to get
around it.
Tony
---8<---
$ diff -u f5rancid.orig f5rancid
--- f5rancid.orig 2008-12-12 12:30:01.000000000 -0500
+++ f5rancid 2008-12-12 12:59:49.000000000 -0500
@@ -545,8 +545,8 @@
{'bigpipe base list' => 'ShowBaseRun'},
{'bigpipe db show' => 'ShowDb'},
{'bigpipe route static show' => 'ShowRouteStatic'},
- {'ls --full-time --color=never /config/ssl/ssl.crt' =>
'ShowSslCrt'},
- {'ls --full-time --color=never /config/ssl/ssl.key' =>
'ShowSslKey'},
+# {'/bin/ls --full-time --color=never /config/ssl/ssl.crt'
=> 'ShowSslCrt'},
+# {'/bin/ls --full-time --color=never /config/ssl/ssl.key'
=> 'ShowSslKey'},
{'bigpipe list' => 'WriteTerm'}
);
# Use an array to preserve the order of the commands and a hash for
mapping
Loading...