Forum Discussion

Pushkar_73645's avatar
Pushkar_73645
Icon for Nimbostratus rankNimbostratus
Sep 04, 2011

Config Sync between load balancers using icontrol

I have two devices in active-active configuration and want to sync between configuration. I am using the web gui configsync option at the moment.

 

 

I found following soap call System->ConfigSync->synchronize_configuration for config sync but i am having trouble understanding the use of it. Has anyone used icontrol API to sync configurations between two devices?

 

 

I mainly had 3 questions about it?

 

1) Is this config sync similar to the web gui options?

 

2) If i want to sync from device A to device B do i need to run this call on device A or device B? Mainly is this a push or pull operation?

 

3) When we use the web gui config sync does it just sync the /config/bigip.conf or complete system configuration?

 

 

Thanks,

 

Pushkar

 

 

2 Replies

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Yep. I used it in a small script to upload data to a datagroup.

     

     

    1. Yes,

     

    2. I always run on the active and sync to the standby... Makes operational sense in that you get fewer surprises where uncontrolled changes may have been made to the standby and suddenly your active changes unexpectedly

     

    3. The shared config is synced... So floating IP addresses, VS, pools, classes, datagroups etc.

     

     

    Small caveat... i'm not aware of any of the v10 options for syncing being present in this call (The call itself is from v9). So there's no pull option. It's always push from this unit to the other...

     

     

     

    My program actually does a small check at the start to make sure the change is being made on the active unit and never the standby to make sure of 2.

     

     

     

    I'll see if I can find a copy somewhere and upload it.

     

     

    H

     

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    And the (Very siple) call to do the sync is

    
    ----------------------------------------------------------------------------
     sub syncConfig
    ----------------------------------------------------------------------------
    sub syncConfig {
      my($configAPI, $synctype)=@_;
    
      print "syncConfig:\n";
      my $soapResponse = $configAPI->synchronize_configuration(SOAP::Data->name(sync_flag => $synctype));
      my($status,$text)=&checkResponse($soapResponse);
      if(($status!=1)||($text ne "OK")) {
        print "syncConfig: status $status error [$text] from synchronize_configuration($synctype)\n";
        return;
      }
      print "syncConfig: status $status success [$text] from synchronize_configuration($synctype)\n";
    
      print "syncConfig:\n";
    }
    

    And called by...

    
    syncConfig($configAPI, "CONFIGSYNC_ALL");
    

    H