For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Ian_P_182483's avatar
Ian_P_182483
Icon for Nimbostratus rankNimbostratus
Jan 13, 2015

Perl Threads for BigIP::iControl

Hi All,

I've got a set of 20odd F5s. I'm trying to use iControl to get info back from them.

This works:
my $conn=BigIP::iControl->new
        (
        server  => $mcName,
        username        => $uname,
        password        => $passwd,
        port    => $port,
        proto   => $proto,
        );

my @vs_list=$conn->get_vs_list();
foreach my $vs (@vs_list)
        {
        print "$vs\n";
        print $conn->get_vs_destination($vs) ."\n";
        print $conn->get_vs_enabled_state($vs) ."\n";
        }

However, given that the F5s are slow to respond (anything up to 1 second per request), I'm trying to use perl threads to do this across all my F5s concurrently, one child thread per F5.

It often doesn't work, but nothing is repeatable. If I try to do the ->new() function inside the threads, they often fail, so I do them in a loop outside the threads.

I then try and do the get_vs_list loop inside threads, sometimes it works, sometimes the get_vs_list fails, sometimes the get_vs_list works, but one of the other calls fails (sometimes saying "Unknown VS").

What am I doing wrong? How do I make concurrent requests to multiple F5s? Would I be better to skip BigIP::iControl and use SOAP::Lite directly? If so, then how do I do it? What soap resources do the F5s provide? Any help gratefully received.

No RepliesBe the first to reply