Richard__Harlan
Dec 01, 2011Historic F5 Account
Createing and modify data group
Running into something weird. In my iApp I am creating an empty data group then in a foreach loop I am modify the same group to add records to the list. What happens if the script tries to do the modify on the when I create the Application service I get the following errorscript did not successfully complete: ( Command failed: tmsh::modify / ltm data-group internal firewall_rules records add { 10.10.10.200 { data 10.10.11.201:80}}internal"/Common/d.app/firewall_rules"" not found Now if I leave the field blank that add records to the data group it will work and when I go back into the Application service and reconfigure and add records it works just fine. When running the command through tmsh it seem to work just fine. Below is the code I am using to. You can see the create if happening first then the modify but when the modify runs it can not find the data group.
Check to see if Firewall iRule enabled
set irule_firewall $::basic__irule_firewall
if { $irule_firewall == $YES_ANSWER } {
set irule_firewall_rule $::basic__irule_firewall_rule
set rule [ split $irule_firewall_rule ; ]
tmsh_create "/ ltm data-group" "internal firewall_rules type string "
foreach rule_rec $rule {
set ip_port [ split $rule_rec | ]
set source [lindex $ip_port 0]
set dest [lindex $ip_port 1]
set port [lindex $ip_port 2]
set dest_port "$dest:$port"
tmsh_modify "/ ltm data-group" "internal firewall_rules records add { $source { data $dest:$port}}"
}
Any ideas? Thanks
Richard