Forum Discussion

paul_adomeit_70's avatar
paul_adomeit_70
Icon for Nimbostratus rankNimbostratus
Jul 03, 2008

Add wideip/pool to GTM

I'm trying to use iControl to add about 500 wideip's to an existing GTM controller. It's beyond painful in the GUI since it's watching about 4000 virtual servers, lists are long etc. I have all the data ready to feed into a perl script to provision everything but I'm stuck on the iControl part. I'm reasonably OK with iControl and use it for other tasks but I can't seem to get this one to work. There are no bigpipe commands to do this so it's either iControl, the GUI or editing wideip.conf which I really don't want to do since there's enough production on the GTM controller already. Also, I don't even see anywhere in iControl where I can set rr_lds_limit.

 

 

Here's what I want wideip.conf to have in the end:

 

 

pool {

 

name "aces.gslb.xyz.com"

 

ttl 30

 

rr_ldns_limit 2

 

preferred rr

 

 

member 10.129.145.85:80

 

member 172.31.153.85:80

 

}

 

 

wideip {

 

name "aces.gslb.xyz.com"

 

pool_lbmode rr

 

pool "aces.gslb.xyz.com"

 

}

 

 

 

What would the command look like to create the pool and what woudl the command look like to create the wideip?

 

 

I had some sample code but I'm not posting it because it's horribly broken.

 

 

-p

 

 

5 Replies

  • I don't have a perl script handy to do this so without something to start with it will take me a while to get one working. I'll reply to this post when I get one working with the pool and wideip create methods.

     

     

    -Joe
  • Here's the 2nd part (creating the wideip). The following will create 2 wideips (to show you how to create muliple objects in one method call). Since you only specified one pool in each wideip, I only have one entry in the WideipPoolLists.

     

     

    I'll post the code for creating the pools in a bit.

     

     

    -Joe

     

     

     Wideip 1 
     push @wideips, "wideip1.foo.com"; 
     push @lb_methods, "LB_METHOD_ROUND_ROBIN"; 
      
     $WideIPPool =  
     { 
       pool_name => "gtm_pool", 
       order => 1, 
       ratio => 1 
     }; 
     push @WideIPPoolList1, $WideIPPool; 
     push @wideip_pools_AofA, [@WideIPPoolList1]; 
      
      Wideip 2 
     push @wideips, "wideip2.foo.com"; 
     push @lb_methods, "LB_METHOD_ROUND_ROBIN"; 
     $WideIPPool =  
     { 
       pool_name => "gtm_pool", 
       order => 1, 
       ratio => 1 
     }; 
     push @WideIPPoolList2, $WideIPPool; 
     push @wideip_pools_AofA, [@WideIPPoolList2]; 
      
     $soapResponse = $WideIP->create( 
       SOAP::Data->name(wide_ips => [@wideips]), 
       SOAP::Data->name(lb_methods => [@lb_methods]), 
       SOAP::Data->name(wideip_pools => [@wideip_pools_AofA]), 
       SOAP::Data->name(wideip_rules => [@wideip_rules_AofA]) 
     ); 
  • I'm having some configuration issues so I can't completely test this successfully, but I'm fairly confident it will work for creating a couple of pools

     pool 1  
      push @pool_list, "wideip_pool1";  
      push @lb_methods, "LB_METHOD_ROUND_ROBIN";  
        
      $member =   
      {  
      member => { address => "10.10.10.10", port => 80 },  
      order => 1  
      };  
      push @MemberList, $member;  
      $member =   
      {  
      member => { address => "10.10.10.20", port => 8080 },  
      order => 2  
      };  
      push @MemberList, $member;  
      push @membersAofA, [@MemberList];  
        
       pool 2  
      push @pool_list, "wideip_pool2";  
      push @lb_methods, "LB_METHOD_ROUND_ROBIN";  
        
      $member =   
      {  
      member => { address => "10.10.10.30", port => 80 },  
      order => 1  
      };  
      push @MemberList2, $member;  
      $member =   
      {  
      member => { address => "10.10.10.40", port => 8080 },  
      order => 2  
      };  
      push @MemberList2, $member;  
      push @membersAofA, [@MemberList2];  
        
        
      $soapResponse = $GlobalLBPool->create (  
      SOAP::Data->name(pool_names => [@pool_list]),  
      SOAP::Data->name(lb_methods => [@lb_methods]),  
      SOAP::Data->name(members => [@membersAofA])  
      );  
      

    Let me know if it returns an error.

    -Joe
  • Hi Joe,

     

    I was able to use the pools section of the code. In my case, I only needed on pool so I just commented out the second poool stuff but the syntax does work.

     

     

    There are a few wideip's that we want to have at least two VS's returned for. I tried to use the "set_answers_to_return" to "2" but it did not work even though the pool was created. I'm sure I just did not send the data the right way. I'll look at the soap debug output, compare it to what the SDK says I'm supposed to send and fix that up. Worst case is since there are only a handful of those is I punt and use the GUI to make that change.

     

     

    I'll check making the wideip after I get the pools created.

     

     

    I really appreciate the examples. Watching someone like me who does Perl only when he has to try to figure out how to create arrays of arrays can provide great entertainment.

     

     

    -p
  • By all means don't punt on something. Give it a shot and if it doesn't work, post the code up here and I'll give it a review for you. Perl is great in it's flexibility but it can be a PITA to debug when it's not working just right.

     

     

    -Joe