Forum Discussion

Deb_Allen_18's avatar
Deb_Allen_18
Historic F5 Account
Jun 09, 2005

finding ACTIVE unit

Hi guys -

 

 

My customer has an iControl app which, in 4.x, hit the floating self-IP to manage node status on the Active unit only (for maintenance).

 

 

We have upgraded to v9 and ported the iControl app, but there is no longer a floating IP for the admin interface and apparently the floating self-IPs cannot be used for admin anymore (I have opened a Support case on that to confirm).

 

 

We're thinking that we'll work around that change by adding a test for failover status after connecting to the first unit, and if it's Standby, drop and connect to the Active peer instead.

 

 

I'm not at all familiar with the v9 API, but I'm sure there must be a pretty simple way to test failover status. Can somebody provide a hint on the call(s) we'd need to use?

 

 

Or is there a better approach?

 

 

 

thx

 

/deb

 

2 Replies

  • Not sure what to advise on the floating ip running on the admin port. As far as I can tell, that isn't possible but I could be wrong. You might try asking product support on that one.

    As for the failover state, You can use the following method to determine the failover state of the device

     enum FailoverState { 
       FAILOVER_STATE_STANDBY = 0, 
       FAILOVER_STATE_ACTIVE = 1 
     }; 
      
     FailoverState System::Failover::get_failover_state();

    The values are just as you would expect, if you get FAILOVER_STATE_STANDBY, the unit is in standby mode, if it's FAILOVER_STATE_ACTIVE, it's the active unit in the pair.

    -Joe
  • Has anyone done a similar solution with v.9 in an active/active failover setup? If everything is working well, both devices will show ACTIVE, so I would need to perform a 2nd check to determine which Unit ID the Virtual Server or it's VLAN are assigned to?

     

     

    I believe the check would have to go against the Virtual Address rather than directly against the Virtual Server?

     

     

    In my case I'm also working on an app to use for maintenance periods, where teams other than the BigIP administrators need to be able to point Virtual Servers at a Pool serving up maintenance pages, and then flip back to the original config. This environment has a lot of iRules, and mistakes have been made numerous times by the non-administrative teams. As a stop gap, I created a shell script that they run before and after maintenance to make a copy of the original config and then reapply that config after maintnenace so that any maintenance changes made are corrected. This works fine, but requires command line SSH access as root, which is definately not safe long-term.

     

     

    So, the app I'm working on needs to read in "current" config data, allow the non-admins to select the virtual servers to direct to the maintenance pool, and then return everything to it's pre-maintenance state when they're done.