Forum Discussion

DarioGB_339840's avatar
DarioGB_339840
Icon for Altostratus rankAltostratus
Nov 08, 2018

Create Persist Record using iRule

Hello.

 

I would like to use VIP-Targeting-VIP after loadbalacing decision in conjuntion with Single Node Persistence (https://devcentral.f5.com/codeshare?sid=690).

 

To do so, I'm using this code.

 

when LB_SELECTED {

     Create persist-record to use it for future loadbalancing decisions
    persist add uie [virtual name]

     Perform VIP-Targeting-VIP base on the previous LB selection
    switch [LB::server port] {
        "1001" {
            LB::reselect virtual VS-Test_1001
        }
        "1002" {
            LB::reselect virtual VS-Test_1002
        }
    }
}

After execution, two persist entries are created

 

 tmsh show ltm persist persist-records | grep universal
universal  /Common/VS-Test_1000  10.130.40.180:1000  10.130.40.180:1002  (tmm: 2)
universal  /Common/VS-Test_1000  10.130.40.180:1000  10.130.40.180:1002  (tmm: 1)

But an error occurs

 

$ curl http://10.130.40.180:1000
curl: (56) Recv failure: Connection reset by peer

Checking LTM log file I see this message.

 

Nov  8 13:32:18 F5-BigIP err tmm[13383]: 01220001:3: TCL error: /Common/Rule_VS-2-VS  - Prerequisite operation not in progress (line 2) (line 2)     invoked from within "persist add uie [virtual name]"

Do you know what the reason could be? Thanks.

 

KR, Dario.