Forum Discussion

Black_Shamrock_'s avatar
Black_Shamrock_
Icon for Nimbostratus rankNimbostratus
Feb 06, 2017

Dependent pool iRules

I have two pools created. The active members in pools 1 and 2 are active, and should change to the standby member ONLY if pool1/active member fails health check. I generated a case with F5, and am informed the functionality needs to be accomplished via iRule.

 

Here are the pool details: VIP 1:10.1.1.1 POOL MBR 110.400.70.176PRIORITY GROUP 5 <--ACTIVE POOL MBR 210.500.42.161PRIORITY GROUP 1

 

VIP 2:10.1.1.2 POOL MBR 110.400.70.177PRIORITY GROUP 5<--ACTIVE POOL MBR 210.500.42.162PRIORITY GROUP 1

 

LB METHODLEASE CONNECTIONS (MEMBER) POOL HEALTH MONITORSTCP

 

The iRule suggested by my case engineer is: when LB_SELECTED { if { [LB::status pool $VIP1name member 10.400.70.176 $poolmemberport] eq "down" or [LB::status pool $VIP2name member 10.400.70.177 $poolmemberport] eq "down" } { pool $VIP1name member 10.500.42.161 $poolmemberport } }

 

I've attempted to 'fill in the blanks' for the information preceded by '$' signs like this: when LB_SELECTED { if { [LB::status pool 10.1.1.1 member 10.400.70.176 28063] eq "down" or [LB::status pool 10.1.1.2 member 10.400.70.177 22] eq "down" } { pool 10.1.1.1 member 10.500.42.161 22 } }

 

Using this iRule, applied to VIP1, the expected behavior is not observed. When I fail pool1/member1, traffic destined for VIP2 does not go pool member 2.

 

Do I have the iRule written incorrectly?

 

  • Hi Black Shamrock,

    I see a good chance to support your scenario by just configuring regular health-monitors. So you may try the following setup...

    - PoolA
        - Member1:
            IP: 10.400.70.176 
            Priority Group: 5
            Health Monitors: Member Specific 
            Availability Requirement: All
            Select Monitors
                - Build-in "tcp" monitor
                - Custom "tcp" monitor with Alias Address / Alias Service Port settings for 10.400.70.177:Service_Port
        - Member2:
            IP: 10.500.42.161
            Priority Group: 1
            Health Monitors: Member Specific 
            Availability Requirement: All
            Select Monitors
                - Build-in "tcp" monitor
    
    
    - PoolB
        - Member1:
            IP: 10.400.70.177 
            Priority Group: 5
            Health Monitors: Member Specific 
            Availability Requirement: All
            Select Monitors
                - Build-in "tcp" monitor
                - Custom "tcp" monitor with Alias Address / Alias Service Port settings for 10.400.70.176:Service_Port
        - Member2:
            IP: 10.500.42.162
            Priority Group: 1
            Health Monitors: Member Specific 
            Availability Requirement: All
            Select Monitors
                - Build-in "tcp" monitor
    

    The above configuration should team the availibility of the members 10.400.70.176 and 10.400.70.177, so that if one of them becomes "offline" both will become "offline" at the same time.

    Cheers, Kai