Forum Discussion

Tim_Lazarus_199's avatar
Tim_Lazarus_199
Icon for Nimbostratus rankNimbostratus
May 12, 2015

F5 DNS iAPP Error

Getting the following error when trying to use the official DNS iAPP... I've tried pre-creating the node, different IP addresses for the node, and pretty much everything else I can think of. I am VERY new to the F5 world, so it could be something totally obvious, but I am at a loss. Any suggestions? This is on the latest BigIP virtual edition appliance.

 

script did not successfully complete: (field not present: "address" while executing "tmsh::get_field_value $node address" (procedure "iapp::destination" line 104) invoked from within "iapp::destination $::vs_pool__vs_addr $::vs_pool__vs_port" (procedure "v11_4_configure_dns_deployment" line 156) invoked from within "v11_4_configure_dns_deployment" invoked from within "subst $substa_out" invoked from within "if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] set substa_out [subst $substa_out] } else { ..." ("uplevel" body line 3) invoked from within "uplevel { append ::substa_debug "\n$substa_in" if { [info exists [set substa_in]] } { set substa_out [subst $$substa_in] ..." (procedure "iapp::substa" line 9) invoked from within "iapp::substa main($do_v11_3,$upgrade,$downgrade)" line:367)

 

31 Replies

  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    Scott- I investigated 11.6HF6 and verified that the fix is not there, due to a procedural mistake. Please continue to use the DNS iApp that posted above instead. Are there other iApps that you wish to use? Unfortunately, almost all will be affected so long as you have FQDN nodes defined.

     

    • Scott_Kehoe_159's avatar
      Scott_Kehoe_159
      Icon for Nimbostratus rankNimbostratus
      Thanks Fred! We have a lot of other iApps in production, but they are working as desired, and no changes are needed with them so I think we are okay. At the moment the EBS VS is the only new change needed. I thought about just building the VS without using iApp, but I prefer creating the VS with iApp, so I'll try the DNS iApp you mentioned.
    • JG's avatar
      JG
      Icon for Cumulonimbus rankCumulonimbus
      Has this issue been fixed in v11.6.1?
  • Hi Fred,

     

    Are you able to update the sap enterprise portal and erp iApps? Or alternatively point me in the right direction so I can update them myself?

     

    I am getting the same issue now I have an FQDN node and need to deploy a new SAP iApp

     

    Cheers, Simon

     

  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    Simon- Make a copy of the f5.sap_erp template and insert the following "iapp_destination" procedure at line 3. Then replace all 5 instances of "iapp::destination" with "iapp_destination". This will allow the template to handle FQDN nodes properly on versions of BIG-IP that support FQDN nodes. You can then re-parent your deployment to the modified template.

    proc iapp_destination { args } {
         Set defaults. Flag actions may overwrite defaults later.
        set route_domain    0
        set do_mask         0
        set port            0
    
         Set up flag-based actions.
        array set flags  {
            -route_domain { [set route_domain [iapp::pull $ptr args]] }
            -mask         { [set do_mask 1] }
            -length       { [set cidr_bits [iapp::pull $ptr args]] }
        }
    
        if { [llength [set non_switches [iapp::process_flags flags args]]] > 2 } {
            error "Too many arguments"
        }
        if { [llength $non_switches] == 2 } { set port [lindex $non_switches 1] }
        set addr [lindex $non_switches 0]
    
         Pull the route-domain off the addr string, but only use it as the
         route domain if it wasn't overridden by -route_domain flag.
        if { [string first "%" $addr] != -1 } {
            if { $route_domain == 0 } {
                 route-domain is still default, so use value from addr string
                set route_domain [lindex [split $addr "%"] 1]
            }
            set addr [lindex [split $addr "%"] 0]
        }
    
        if { $do_mask } { ; calculate a mask
    
             Define the delta between ipv4 and ipv6.
             length: ipv4 mask is 32 bits, ipv6 is 128 bits.
             group: ipv4 is grouped in octets, ipv6 as 16 bit words.
             format: ipv4 is decimal notation, ipv6 is hex.
             format1 also has the delimiter, format2 does not.
            array set v {
                0,length  32
                0,group   8
                0,format1 d.
                0,format2 d
                1,length  128
                1,group   16
                1,format1 .4x:
                1,format2 .4x
            }
    
             Detect a node name and convert it to an ip address, then detect IPv6.
            if { [string first / $addr] != -1 } {
                set node [lindex [tmsh::get_config ltm node $addr] 0]
                set addr [tmsh::get_field_value $node address]
            }
            set is_ipv6 [string match "*:*:*" $addr]
    
             Soften result of an illegal -length parameter.
            if { ![info exists cidr_bits] || $cidr_bits > $v($is_ipv6,length) } {
                set cidr_bits $v($is_ipv6,length)
            } elseif { $cidr_bits < 0 } {
                set cidr_bits 0
            }
    
             Loop on the full length of the mask: 32 bits for ipv4, 128 for ipv6
            for { set octet 0; set i 0 } { $i < $v($is_ipv6,length) } { incr i } {
    
                Take a break at intervals to save the grouping and add delimiter.
                Interval is 8 bits for ipv4 and 16 bits for ipv6.
               if { $i && ![expr {$i % $v($is_ipv6,group)}] } {
    
                    Add the grouping and delimiter to the mask, then reset.
                   append mask [format %$v($is_ipv6,format1) $octet]
                   set octet 0
               }
                Shift the prior bits left by multiplying by 2.
                Then add the current bit, which is 1 if part of the mask, 0 if not.
                Current bit is part of the mask if $i < number of bits in the mask.
               set octet [expr { 2 * $octet + ($i < $cidr_bits) }]
            }
             Add the final grouping, then return the finished mask.
            set ret_val [format $mask%$v($is_ipv6,format2) $octet]
    
        } else { ; calculate a destination
             the route domain might be a name and we need a number.
            if { ![string is integer $route_domain] } {
                set route_domains [tmsh::get_config "/ net route-domain $route_domain"]
                if { [llength $route_domains] != 1 } {
                    error "no such route domain: $route_domain"
                }
                 since we have already determined that the list is 1 long,
                 this explicit reference to element 0 is safe
                set route_domain [tmsh::get_field_value [lindex $route_domains 0] "id"]
            }
    
            set route_domain [expr { $route_domain == 0 ? "" : "%$route_domain" }]
    
             0 and * represent wildcard port assignments in the GUI,
             but TMSH requires the string 'any' to specify a wildcard.
            if { $port == 0 || $port == "*" } {
                set port any
            }
    
             Build the final destination. Use ":" for node names even if ipv6.
            set is_ipv6_literal [string match "*:*:*" $addr]
            set addr_delimiter  [expr { $is_ipv6_literal ? "." : ":" }]
            set ret_val ${addr}${route_domain}${addr_delimiter}${port}
        }
        return $ret_val
    }
    
    • Hyder_141209's avatar
      Hyder_141209
      Icon for Altostratus rankAltostratus

      Hi there! Thanks for your answers on this. I am running 11.6 HF6 ATM. Unfortunately, cannot upgrade to newer version/hotfix or 12.0 for change management control. Could you please elaborate the differences between the working one and not working one. What's been added or modified in the code level? Would like to fix that manually in the implementation part if possible. Do appreciate your earliest response. Cheers.

       

    • Fred_Slater_856's avatar
      Fred_Slater_856
      Historic F5 Account

      The 11.6 iapp::destination proc did not work with the new FQDN node feature. The working proc (iapp_destination, shown above) is identical to the 11.6 proc except that this offending code was removed:

       

           Detect addresses that match node definitions
          set nodes [tmsh::get_config ltm node recursive]
          foreach node $nodes {
              if { $addr eq [tmsh::get_field_value $node address] } {
                  set addr [tmsh::get_name $node]
                  break
              }
          }

      An alternative to the fix described in my previous comment is to directly edit /usr/share/tcl8.4/iapp/iapp.1.1.2.tcl and remove these lines. Edits to this file take immediate effect on all iApps.

       

    • Hyder_141209's avatar
      Hyder_141209
      Icon for Altostratus rankAltostratus

      Thanks very much for clarification Fred. Have tried the proc. Unfortunately, now each time I need to create new node (even for IP) before executing the iApp for that specific new pool member. Is that usual?