Forum Discussion

pimy_233956's avatar
pimy_233956
Icon for Nimbostratus rankNimbostratus
Nov 13, 2015

iControl PS Snapin throws error when calling LocalLBPool.get_member_metadata

iControlSnapin v23 PowerShell v4.0

 

Hi,

 

I am able to successfully call other LocalLBPool methods. When I attempt to call LocalLBPool.get_member_metadata I receive an error.

 

(Get-F5.iControl).LocalLBPool.get_member_metadata(@('mypool'),@($object))

Exception calling "get_member_metadata" with "2" argument(s): "There is an
error in XML document (11, 2)."
At line:1 char:64
+ (Get-F5.iControl).LocalLBPool.get_member_metadata(@('mypool'),@($object))
+                                                                ~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException
`

Of course I run Initialize-F5.iControl first. I build my $object using this code:

`$object = New-Object -TypeName iControl.CommonAddressPort
$object.address = 'mynodeaddress'
$object.port = 443
`

Here is an example of a method that works fine with that same object:
`(Get-F5.iControl).LocalLBPool.get_member_object_status(@('mypool'),@($object))

       availability_status             enabled_status status_description
       -------------------             -------------- ------------------
 AVAILABILITY_STATUS_GREEN     ENABLED_STATUS_ENABLED The DNS server(s) are ...

Any ideas? Is the source code for the iControlSnapin available somewhere?

 

Thanks, pimy

 

  • Hi pimy, what version of BIG-IP are you attempting to make the call on? The documentation for LocalLB.Pool.get_member_metadata() says it was introduced in BIG-IP v11.2.0. Typically "InvalidOperationException" implies you are attempting to make a call on a method that doesn't exist on that platform.

     

    We strive to make iControl APIs additive so once it's introduced, you can use it on that platform moving forward. Let us know if you are on a version >= 11.2.0 and I'll see what I can find out.

     

    -Joe

     

  • Whoops. Sorry about that.

     

    Product : Virtual BigIP LTM ProductVersion : 11.6.0 PackageVersion : Build 5.13.429 - Thu Jul 23 16:58:10 PDT 2015 PackageEdition : Engineering Hotfix HF5

     

    I am guessing it has something to do with the fact that there is no metadata for that pool, and the code might not be set up to handle that? Or possibly, the pool is corrupt. However, I tried known good pools, and it throws the same errror.

     

    I captured the SOAP requests and responses of both the successful and failed calls. I noticed that the failed response does not have the right type of array, and the item field is empty.

     

    mypoolmynodeaddress443

    Please forgive any typos. I tried to scrub the pool and node info, so you might see a mismatch between the original error, and the SOAP info. You can safely ignore that.

     

    Thanks, pimy

     

  • Won't let me edit my previous post.

    That is the request. Here is the response:

    
    
    
    
    
    
    
    
    
    
    
    
  • I don't recall what came of this. I know that I stopped using that Snapin, and converted all of the functionality I needed into http calls to the REST API, which is working to my satisfaction.

     

    Good luck to you.