Forum Discussion

Zdenda's avatar
Zdenda
Icon for Cirrus rankCirrus
Oct 15, 2013

Pool member control issue when non-default partition is used

Hi, I use script from https://devcentral.f5.com/wiki/iControl.PsPoolMemberControl.ashx. My problem is when I call function Disable-Member, I get error 16908336. I run this script command by command and found out that command

$MemberStatisticsA = (Get-F5.iControl).LocalLBPoolMember.get_statistics( (, $pool_name), $MemberDefAofA); generates error when I am using non-default partition. All another functions seems to be fine. Do you have any idea why it is so?

 

Thanks, Zdenek

16 Replies

  • Hi Zdenda, I have had a call open with F5 for over 3 weeks now for this exact same problem. Anything outside the Common partition does not work when attempting to get statistics. This is true even when using I ensure that the current active system folder is set to the partition I need it to be using (Get-F5.iControl).SystemSession.get_active_folder() If you hear back please post it. Thank you.
  • Hi, unfortunatelly this issue still persists. I tried some parts of this script.

    But this "get_all_statistics" command is not working when I am not in Common partition.

     

    $PoolList = (Get-F5.iControl).LocalLBPool.get_list() | Sort-Object;
    $MemberStatisticsA = (Get-F5.iControl).LocalLBPoolMember.get_all_statistics($PoolList)
    

     

    Is it possible that it is something wrong with F5 and we have to wait for fix? I use version 11.3.0 HF7

    Thanks, Zdenek

  • Yep, screen in first post was from lab where I run version 10.2.x, so it was related to partition. But then I continued in version 11.x.x so it was really related to version.

    Anyway, I corrected code, so it is 11.xx friendly and I am back in partition problem (the same error code 16908336 (0x01020030) as in the first post). Here is the full code:

     

    (Get-F5.iControl).ManagementPartition.set_active_partition( ( ,"MyPartition"))
    $pool_name = "lipe_pool"
    $member = "10.147.140.61:80"
    
    $vals = $member.Split( (, ':'));
    $member_addr = $vals[0];
    $member_port = $vals[1];
    
    $MemberDef = New-Object -TypeName iControl.CommonAddressPort;
    $MemberDef.address = $member_addr;
    $MemberDef.port = $member_port;
    $MemberDefAofA = New-Object -TypeName "iControl.CommonAddressPort[][]" 1,1
    $MemberDefAofA[0][0] = $MemberDef;
    
    $MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics( (, $pool_name), $MemberDefAofA);
    

     

    And here is the result when I try the last command:

    I am really trying to find solution for that, but still not successful. Is it really something bad in F5, or do I miss something still? Thanks a lot, Zdenek

    • Zdenda's avatar
      Zdenda
      Icon for Cirrus rankCirrus
      Interesting is that this command runs without problems and it uses the same definitions: (Get-F5.iControl).LocalLBPool.add_member_v2( (, $pool_name), $MemberDefAofA);
  • Even if you have switched to the correct partition you still need to specify the partition for both the server and the pool in your code.

     

        (Get-F5.iControl).ManagementPartition.set_active_partition( (,"PARTITION_NAME") )
    Write-Host (Get-F5.iControl).ManagementPartition.get_active_partition() -ForegroundColor Yellow
      $address = New-Object -TypeName iControl.CommonAddressPort;
      $address.address ="/PARTITION_NAME/SERVER_NAME"
      $address.port = 666;
    
        $MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics( ("/PARTITION_NAME/POOL_NAME"), $address);
          $MemberStatisticEntry = $MemberStatisticsA[0].statistics[0];
        $Statistics = $MemberStatisticEntry.statistics;
        foreach ($Statistic in $Statistics)
        {
          $type = $Statistic.type;
          $value = $Statistic.value;
    
          if ( $type -eq "STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS" )
          {
             just use the low value.  Odds are there aren't over 2^32 current connections.
             If your site is this big, you'll have to convert this to a 64 bit number.
            $cur_connections = $value.low;
            Write-Host "Current Connections: $cur_connections"
          }
        }
    • Zdenda's avatar
      Zdenda
      Icon for Cirrus rankCirrus
      Ah, you was quicker then me, I noticed it's missing in the code above by mistake. Now there is actuall code, error is the same
  • Zdenda, if you still getting an error can you post your code? I'll see if i can spot an issue.

     

  • Hi, the code is mentioned above your code (last my post where is also printscreen attached). Anyway, I tried also your code and the result is still the same (I run v11.3)..

     

    (Get-F5.iControl).ManagementPartition.set_active_partition( (,"MyPartition") )
    
    $address = New-Object -TypeName iControl.CommonAddressPort;
    $address.address ="/MyPartition/10.147.140.61"
    $address.port = 80;
    
    $MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics( ("/MyPartition/lipe_pool"), $address);
    • Eugene_Reznik_1's avatar
      Eugene_Reznik_1
      Icon for Nimbostratus rankNimbostratus
      Try using the server name instead of the IP address. I had an issue with using the IP. Also the case matters.
    • Zdenda's avatar
      Zdenda
      Icon for Cirrus rankCirrus
      name is 10.147.140.61%1, so I used this: $address.address ="/MyPartition/10.147.140.61%1" and I got this: Exception calling "get_member_statistics" with "2" argument(s): "There is an error in XML document (226, 74)." At line:1 char:73 + $MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics <<<< ( ("/MyPartition/lipe_pool"), $address); + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException
    • Zdenda's avatar
      Zdenda
      Icon for Cirrus rankCirrus
      Ok, this was solved by IcontrolSnapin reinstalation. I don't know if I had old version or if it was corrupted or something like that
  • I have the same issue. Is it fixed in new version of iControl and/ot F5 ?
  • I have the same issue. Is it fixed in new version of iControl and/ot F5 ?
  • Any lucky guys? I still have the same issue. Seems it is never resolved in F5 devcentral.