[rancid] Is there a working f5rancid script for 10.1 and 11.4 ?

Matt Almgren malmgren at skyfire.com
Wed Mar 26 22:29:58 UTC 2014


Update, I found that the new f5rancid script couldn't find the "clogin" script, but now after adding the relative path,  it looks like the script times out after issuing the second command in the command table.  If I issue that command string in the CLI myself exactly as shown, I see no problems.


* f5rancid*
[rancid at mtv-lb001:Active:St./f5rancid -d mtv-lb001
executing clogin -t 90 -c "bigpipe version 2>&1" mtv-lb001
The F5 says to use tmsh, using tmsh command table for config collection.
executing clogin -t 90 -c "tmsh show /sys version;tmsh show /sys hardware;tmsh show /sys license;cat /config/ZebOS.conf;lsof -i :179;tmsh show /net route static;tmsh -q list" mtv-lb001
PROMPT MATCH: \[rancid at mtv-lb001:Active:Standalone\] ~ #
HIT COMMAND:[rancid at mtv-lb001:Active:Standalone] ~ #  tmsh show /sys version
    In ShowVersion: [rancid at mtv-lb001:Active:Standalone] ~ #  tmsh show /sys version
HIT COMMAND:[rancid at mtv-lb001:Active:Standalone] ~ # tmsh show /sys hardware
    In ShowHardware: [rancid at mtv-lb001:Active:Standalone] ~ # tmsh show /sys hardware
<hangs here>
^C
[rancid at sfo-admin007 bin]$

* manual*

[rancid at mtv-lb001:Active:Standalone] ~ # tmsh show /sys version;tmsh show /sys hardware

Sys::Version
Main Package
  Product  BIG-IP
  Version  11.4.1
  Build    625.0
  Edition  Hotfix HF1
  Date     Wed Oct 23 20:28:39 PDT 2013

Hotfix List
ID431391  ID433880  ID432225  ID431356  ID432140  ID425846
ID434970  ID429768  ID433863  ID424999  ID432746  ID424328
ID273176  ID429187  ID426874  ID426742  ID426929  ID432748
ID431393  ID427955  ID431744  ID430848  ID430551  ID421045
ID431900  ID428698  ID428700  ID432711  ID425090  ID428622
ID429127  ID419082  ID429580  ID420883  ID425603  ID432805
ID420335  ID427415  ID431742  ID431292  ID425003  ID431660
ID431212  ID420718  ID427673  ID428031  ID428843

Sys::Hardware
Chassis Fan Status
  Index  Status  Fan Speed(rpm)
  1      up      9642
  2      up      10546
  3      up      9926
 <snip>

Thanks, Matt



From: Matt Almgren <malmgren at skyfire.com<mailto:malmgren at skyfire.com>>
Date: Wednesday, March 26, 2014 2:22 PM
To: "Rancid-discuss at shrubbery.net<mailto:Rancid-discuss at shrubbery.net>" <Rancid-discuss at shrubbery.net<mailto:Rancid-discuss at shrubbery.net>>
Subject: Is there a working f5rancid script for 10.1 and 11.4 ?

Hi all, I'm looking for a working f5rancid script for the following:

We have a mix of f5 devices that are running either 10.1/10.2(bigpipe) or 11.4 (tmsh).   Our configured "rancid" user is logging in via TACACS and is dropped into the advanced shell.  Using the original f5rancid script, of course there's no tmsh commands, so it fails for the 11.4 devices.  So I downloaded the latest f5rancid script from the github repo here: https://github.com/dotwaffle/rancid-git/blob/master/bin/f5rancid.in, which has tmsh commands in it, but it doesn't work as I think it should and brings up more questions.

When I run the f5rancid script manually I see that it doesn't look like it's choosing the tmsh commands.   Is there something I am missing to tell it to use tmsh?   I would think it can grok that from the command prompt, but I'm not sure of the logic.  I tried looking at the f5rancid script and I see where it's supposed to make the choice, but my perl skills suck.

[rancid at sfo-admin007 bin]$ ./f5rancid -d mtv-lb001
executing clogin -t 90 -c "bigpipe version 2>&1" mtv-lb001
executing clogin -t 90 -c "bigpipe version;bigpipe platform;cat /config/bigip.license;bigpipe monitor list all;bigpipe profile list;bigpipe base list;bigpipe db show;bigpipe route static show;bigpipe list" mtv-lb001
sh: clogin: command not found
mtv-lb001: missed cmd(s): bigpipe route static show,bigpipe base list,cat /config/bigip.license,bigpipe platform,bigpipe db show,bigpipe monitor list all,bigpipe version,bigpipe profile list,bigpipe list
mtv-lb001: missed cmd(s): bigpipe route static show,bigpipe base list,cat /config/bigip.license,bigpipe platform,bigpipe db show,bigpipe monitor list all,bigpipe version,bigpipe profile list,bigpipe list
mtv-lb001: End of run not found
mtv-lb001: End of run not found
#
[rancid at sfo-admin007 bin]$


Clogin shows that it is able to login and lands in the advanced shell:

[rancid at sfo-admin007 root]$ /usr/local/rancid/bin/clogin mtv-lb001
mtv-lb001
spawn ssh -c 3des -x -l rancid mtv-lb001
Password:
Last login: Wed Mar 26 13:58:46 2014 from 10.102.128.27
[rancid at mtv-lb001:Active:Standalone] ~ #

Anyone got a working f5 script and brief README they can share with me?

Thanks, Matt

--
Matt Almgren | Sr. Network Engineer
779 Evelyn Ave, Suite 200
Mountain View, CA 94041
Mobile: 408.499.9669
[cid:1CFB777E-88E3-4BCE-BCDD-3AB882F248DB]


________________________________
This message is being sent by Skyfire Labs. It is intended exclusively for the individuals and entities to which it is addressed. This communication, including any attachments, may contain information that is proprietary, privileged, confidential, or otherwise subject to restrictions on disclosure pursuant to applicable law. If you are not the named addressee, you are not authorized to read, print, retain copy or disseminate this message or any part of it. If you have received this message in error, please notify the sender immediately by email and delete all copies of this message. This message is protected by applicable legal privileges and is confidential.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20140326/98a98333/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 59F43D28-06AA-430E-8E95-7B1F1F738B61.png
Type: image/png
Size: 14827 bytes
Desc: 59F43D28-06AA-430E-8E95-7B1F1F738B61.png
URL: <http://www.shrubbery.net/pipermail/rancid-discuss/attachments/20140326/98a98333/attachment.png>


More information about the Rancid-discuss mailing list