Forum Discussion

Casey_Lucas_167's avatar
Casey_Lucas_167
Icon for Nimbostratus rankNimbostratus
Mar 25, 2014

Transient data group failures from iRules

We're upgrading LTMs (9.2 to 11.x) and are converting/upgrading some iRules. When we did the original implementation years ago we had to put in some special logic because of transient failures when trying to access data groups from iRules. When the data group was accessed in the iRule at the same time the data group was being modified in the GUI (or via iControl), the iRule access would fail (as if the data group did not exist). For example, the following would fail:

when HTTP_REQUEST {
   following line would fail if 'some_data_group' was being modfied via LTM GUI.
  set preferredPool [findclass PREFERRED_POOL some_data_group " "]
}

My assumption at the time was that the data group modification was implemented with a complete delete followed by an insert vs an in-place modification.

We are now using

class
instead of
findclass
and we have been unable to reproduce the transient problem of not being able to access a data group while modifying the data group. As it's difficult to disprove the existence of a problem, does anyone know if data groups are now (11.x) updated in an autonomous way? I.E. do iRules need to handle a missing data group because the data group is being updated?

2 Replies

  • external data groups in 11.4+ are atomic, but there is an issue with internal data groups.

    That said, another user had some success with atomic-like updating (for test, ymmv) within tmsh:

    while true; do
      tmsh modify ltm data-group internal dg1 records add { /key1 { data data1 }}
      tmsh modify ltm data-group internal dg1 records delete { /key1 } done
    
  • yes, the script is just to validate the atomic operation of the datagroups (it had supporting irule test language)

    In the GUI, you can import external data groups from System->File Management->Data Group File List, or from Local Traffic->iRules->Data Group List->Create and select the type as External File and then click Import (or select if you've already imported)

    You can also create one in tmsh:

    tmsh create /sys file data-group dg1_external_file separator ":=" source-path file:/var/tmp/dg1.txt type string
    tmsh create /ltm data-group external dg1_external external-file-name dg1_external_file