Forum Discussion

Andy_4386's avatar
Andy_4386
Icon for Nimbostratus rankNimbostratus
Jul 16, 2010

Problem with LocalLB.PoolMember.set_monitor_association

I'm trying to call set_health_monitor to configure http monitors for a test pool; the BigIP is complaining about not being able to find the "pool_names" element, but it's in the XML body sent to the BigIP. Below is the error and XML body.

I'm guessing the error is in the structure of the XML (as most of the other problems I've encountered have been).

=========================================================================================

1) Error:

test_set_health_monitor(Test::Loadbalancer::Run):

::Loadbalancer::Base::SoapFault: (SOAP-ENV:Server) Could not find element by name: pool_names

XML sent to BigIP:




 
   aboveground
   
     
       MONITOR_RULE_TYPE_SINGLE
       2
       
         http
       
     
   
 


=========================================================================================

Actually noticed another thing. The API reference specifies that the element should be just "pool_name", not "pool_names" as the BigIP says it iis looking for. I tried changing the element to "pool_name" just for kicks and still get the same error above.

Regarding my environment, I'm programming in Ruby using Builder to put together the SOAP message and Savon for the SOAP communication.

Any ideas?

Cheers,

Andy

4 Replies

  • Andy, there is no set_health_monitor method in the API. Can you provide the calling code so I know exactly which method you are calling. The LocalLB.Pool.set_monitor_association() method is likely what you are calling. There is also a LocalLB.PoolMember.set_monitor_association() method to set the monitors for a specific pool member. That method does have a separate pool_names parameter.

     

     

    So, it looks to me like you are trying to call the LocalLB.PoolMember.set_monitor_association() method with the payload designed for the LocalLB.Pool.set_monitor_association() method. Could this be the case? Take a look at the two methods (depending on whether you want to work at the pool level, or with an individual pool member). Hopefully that will clear things up.

     

     

    Sorry for the guesses, I'm don't have any experience with the Ruby SOAP interfaces.

     

     

    -Joe

     

  • Joe, apologies for the confusion...the subject line had the correct method and the body of my post was off...the code I'm trying does have the correct method defined - set_monitor_association.

     

     

    The payload does appear to be correct, but for some reason, I keep getting an error complaining about pool_names. The API reference describes the MonitorAssociation struct as having an element titled pool_name...though it seems the BigIP expects pool_names (see attached). I tried both with similar results.

     

     

    I'm curious whether you think the XML payload is missing something or has incorrect attributes? With Ruby, I've built a method to build the XML payload according to the API reference...it's been successful for other operations leading up to this one - e.g. creating/deleting pools, creating/deleting virtual servers, etc Do you have a sample of working XML for set_monitor_association for comparison?

     

     

    Thanks, Andy
  • I still think you have the interfaces off. The LocalLB.Pool and LocalLB.PoolMember interfaces both have set_monitor_association methods:

     

     

    LocalLB.PoolMember.set_monitor_association(
      in String [] pool_names,
      in LocalLB__PoolMember__MemberMonitorAssociation [] [] monitor_associations
    );
    LocalLB.Pool.set_monitor_association(
      in LocalLB__Pool__MonitorAssociation [] monitor_associations
    );

     

     

    It looks to me like you have the URI for the method pointing to the PoolMember.set_monitor_association method while you are passing the payload for the LocalLB.Pool.set_monitor_association method.

     

     

    If you could post the code where you initialize the interface and make the method call with the parameters, it will help debugging further.

     

     

    -Joe

     

  • I traced the full generated XML and indeed, you're right, I was using the incorrect interface - "urn:iControl:LocalLB/PoolMemberset_monitor_association". I fixed that bit, so now am using "urn:iControl:LocalLB/Poolset_monitor_association". The missing pool_names error is gone as expected; but I started receiving a 500 error on a missing element: type.

    I experimented a bit with the XML for the monitor_rule element. At first, I had it defined like this, which was incorrect:

    
    
      
        MONITOR_RULE_TYPE_SINGLE
        1
        
          http
        
      
    
    

    I changed the XML for monitor_rule to this, and it ended up working:

    
    
      MONITOR_RULE_TYPE_SINGLE
      1
      
        http
      
    
    
    I'm all set, thanks for your help, Andy