Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-4888

collapsed_forwarding plugin returns TSREMAP_DID_REMAP though it did not perform remap

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.2.1, 7.1.0
    • 6.2.1, 7.0.0
    • Plugins
    • None

    Description

      Collapsed_forwarding plugin returns TSREMAP_DID_REMAP as a return value though it did not perform any remap. This causes ATS not to perform remap and makes the transaction failed due to DNS lookup error on "from url".

      For more details..

      Hi,

      I am testing collapsed_forwarding plugin (https://docs.trafficserver.apache.org/en/latest/admin-guide/plugins/collapsed_forwarding.en.html?highlight=collapsed_forwarding) via ATS 6.2.x branch.

      We observed an error "DNS error 2 for [testurl.com]" for cache-miss, when remap.config is configured with "collapsed_forwarding" to work alone as a remap plugin. We must modify TSRemapDoRemap() in the plugin to "return TSREMAP_NO_REMAP" to allow DNS lookup successful. It does not seem right for the plugin to do "return TSREMAP_NO_REMAP" when it did not.

      Can someone help me to understand how this plugin needs to be used? Or does it require the fix I mentioned above?

      Regards,
      Kishore

      == Sample remap.config entry and cach miss error when used "collapsed_forwarding" by itself == map http://testurl.com/ http://origin.com/ @plugin=collapsed_forwarding.so @pparam=-delay=10 @pparam=-retries=5

      I observed that during cache-miss, DNS query happens on the 'from' url (hostname) in the remap and it gets failed.
      ....
      [Sep 9 19:39:16.355] Server

      {0x2b170ea6c940} DEBUG: (dns) send query (qtype=1) for testurl.com to fd 43 [Sep 9 19:39:16.355] Server {0x2b170ea6c940}

      DEBUG: (dns) sent qname = testurl.com, id = 9287, nameserver = 1 [Sep 9 19:39:16.355] Server

      {0x2b170ea6c940} DEBUG: (dns) sent_one: failover_number for resolve 1 is 1 [Sep 9 19:39:16.628] Server {0x2b170ea6c940}

      DEBUG: (dns) received packet size = 52 [Sep 9 19:39:16.628] Server

      {0x2b170ea6c940} DEBUG: (dns) round-robin: nameserver 1 DNS respons code = 0 [Sep 9 19:39:16.628] Server {0x2b170ea6c940}

      DEBUG: (dns) received rcode = 2 [Sep 9 19:39:16.628] Server

      {0x2b170ea6c940} DEBUG: (dns) DNS error 2 for [testurl.com] [Sep 9 19:39:16.628] Server {0x2b170ea6c940}

      DEBUG: (dns) doing retry for testurl.com

      I further looked in to the code and found that it is due to return code from the plugin is TSREMAP_DID_REMAP in TSRemapDoRemap(). It makes ATS not to perform remap.

      Attachments

        Activity

          I will be working on the PR.

          rkishore Rajendra Kishore Bonumahanti added a comment - I will be working on the PR.

          People

            psudaemon Phil Sorber
            rkishore Rajendra Kishore Bonumahanti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 3h
                3h

                Slack

                  Issue deployment