Forum Discussion
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
- Matthew_Harris1
Nimbostratus
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. - Zdenda
Cirrus
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
- Eugene_Reznik_1
Nimbostratus
This sounds like a bug. Can someone from F5 confirm if/when it will get fixed? - Zdenda
Cirrus
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
Cirrus
Interesting is that this command runs without problems and it uses the same definitions: (Get-F5.iControl).LocalLBPool.add_member_v2( (, $pool_name), $MemberDefAofA);
- Eugene_Reznik_1
Nimbostratus
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
Cirrus
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
- Eugene_Reznik_1
Nimbostratus
Zdenda, if you still getting an error can you post your code? I'll see if i can spot an issue.
- Zdenda
Cirrus
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
Nimbostratus
Try using the server name instead of the IP address. I had an issue with using the IP. Also the case matters. - Zdenda
Cirrus
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
Cirrus
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
- THM_194465
Nimbostratus
I have the same issue. Is it fixed in new version of iControl and/ot F5 ? - THM_194465
Nimbostratus
I have the same issue. Is it fixed in new version of iControl and/ot F5 ? - Ellison_Zhang_2
Nimbostratus
Any lucky guys? I still have the same issue. Seems it is never resolved in F5 devcentral.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com