Forum Discussion

Ron_Messana_329's avatar
Ron_Messana_329
Icon for Nimbostratus rankNimbostratus
Aug 03, 2017

Syntax error when appending to a datagroup with tmsh

I am attempting to append a line to a datagroup on a LTM running BIG-IP 11.5.3 Build 2.0.196 Hotfix HF2

 

Running this command

 

modify ltm datagroup external my_datagroup records add {"domain.example.com"{"10.10.10.10"}}

 

I am receiving the following error

 

Syntax Error: "records" read only property

 

Any help is greatly appreciated

 

1 Reply

  • Hello Ron,

    As you are trying to modify an "external" data group you are getting this error because LTM is in a Read Only mode on the external data-groups.

    You can see that by yourself when going to "Local Traffic ›› iRules : Data Group List ›› your_external_dg " you will discover that it is only pointing or referencing to an external file that you have uploaded from here

    "System ›› File Management : Data Group File List" and clicking on "import"

    So rather than trying to update a line in you data-group you will need to :

    • copy the content (using ssh "cp" for example) of you data-group
    • then importing it to override the existing one using the following command

    tmsh create /sys file data-group string_name_value_external_v2_dg_file separator ":=" source-path file:/var/tmp/string_name_value_external_v2_dg.txt type string

    You can check this following link if you need more details

    https://devcentral.f5.com/articles/v11-irules-data-group-updates

    Hope it helps

    Regards