irule problem after upgrade from v9 to v11

After upgrading from v9 to v11.2, irule got some problem.

before upgrade

class http_list {

“abc.com abc-r.com abc-r_pool”

“xyz.com xyz-r.com xyz-r_pool”

“123.com 123-r.com 123-r_pool”

}

when HTTP_REQUEST {

set rp_list $::http_list

set host [HTTP::host]

set proxy_host_entry [findclass [string tolower $host] $rp_list]

if { $proxy_host_entry ne “” } {

set rp_host [getfield $proxy_host_entry " " 2]

set rp_pool [getfield $proxy_host_entry " " 3]

HTTP::header replace “Host” $rp_host

pool $rp_pool

}

}

After upgrade

ltm data-group internal /Common/http_list {

records {

“abc.com abc-r.com abc-r_pool” { }

“xyz.com xyz-r.com xyz-r_pool” { }

“123.com 123-r.com 123-r_pool” { }

}

type string

}

However should I convert the irule to work in v11.2?

can you create pool starting with numeric i.e. 123-r_pool?

root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm data-group internal http_list
ltm data-group internal http_list {
    records {
        "abc.com abc-r.com abc-r_pool" { }
        "xyz.com xyz-r.com xyz-r_pool" { }
    }
    type string
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
    destination 172.28.19.252:80
    ip-protocol tcp
    mask 255.255.255.255
    profiles {
        http { }
        tcp { }
    }
    rules {
        myrule
    }
    snat automap
    vlans-disabled
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
    when HTTP_REQUEST {
   if {[class search -- http_list starts_with [HTTP::host]]} {
      set rec [class search -name http_list starts_with [HTTP::host]]
      HTTP::header replace Host [getfield $rec " " 2]
      pool [getfield $rec " " 3]

      log local0. "[HTTP::host] | $rec | [getfield $rec " " 2] | [getfield $rec " " 3]"
   }
}
}

[root@ve11a:Active:Changes Pending] config  tail -f /var/log/ltm
Oct 10 15:22:14 tmm info tmm[8764]: Rule /Common/myrule : abc.com | abc.com abc-r.com abc-r_pool | abc-r.com | abc-r_pool
Oct 10 15:22:16 tmm info tmm[8764]: Rule /Common/myrule : xyz.com | xyz.com xyz-r.com xyz-r_pool | xyz-r.com | xyz-r_pool

Thanks for your reply nitass. I will try that.

Those are just dummy names :slight_smile: