Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.4
    • Component/s: Plugins
    • Labels:
      None

      Description

      combo_handler require ESI's code. Before make ESI work as a lib, you can try it this way:

      make "esi/lib" and "esi/fetcher" the subdir of combo_handler and use the makefile.

       
      combo_handler
      |____combo_handler.cc
      |____fetcher
      |____lib
      |____LICENSE
      |____Makefile
      |____README
      
      1. Makefile
        0.4 kB
        Conan Wang
      2. fetcher.diff
        0.8 kB
        Conan Wang
      3. combo_handler.diff
        13 kB
        Conan Wang

        Issue Links

          Activity

          Hide
          Leif Hedstrom added a comment -

          Moved to 3.1.4, please move bugs back to 3.1.3, which you will work on in the next 2 weeks.

          Show
          Leif Hedstrom added a comment - Moved to 3.1.4, please move bugs back to 3.1.3, which you will work on in the next 2 weeks.
          Hide
          Leif Hedstrom added a comment -

          Moving all unassigned bugs out to 3.3.0. Move back and assign as necessary.

          Show
          Leif Hedstrom added a comment - Moving all unassigned bugs out to 3.3.0. Move back and assign as necessary.
          Hide
          Leif Hedstrom added a comment -

          Moving to 3.3.2.

          Show
          Leif Hedstrom added a comment - Moving to 3.3.2.
          Hide
          Leif Hedstrom added a comment -

          What's the status on this? Is this still relevant? Conan, if so, would you mind making a new patchset for current master, and I can review / commit that.

          Thanks!

          – Leif

          Show
          Leif Hedstrom added a comment - What's the status on this? Is this still relevant? Conan, if so, would you mind making a new patchset for current master, and I can review / commit that. Thanks! – Leif
          Hide
          Leif Hedstrom added a comment -

          Ping ?

          Show
          Leif Hedstrom added a comment - Ping ?
          Hide
          Leif Hedstrom added a comment -

          So, I have some patches for this. but, I'm also thinking we should move this plugin in under the esi plugin source tree. Such that it builds both esi.so and combo_handler.so. They both share code, and it makes sense to combine them I think.

          Show
          Leif Hedstrom added a comment - So, I have some patches for this. but, I'm also thinking we should move this plugin in under the esi plugin source tree. Such that it builds both esi.so and combo_handler.so. They both share code, and it makes sense to combine them I think.
          Hide
          Conan Wang added a comment -

          Sorry, I miss your comments. +1 for combination.

          I've made some changes after those old attachments. Some of them may be not general for our users. So I have no ideas how to update this ticket.

          Changes I made (separately pasted on pastebin for convenience and most are minor changes):

          1. use HOST header as default bucket http://pastebin.com/pGHfLaHR
            Original code use the first segment of Host as the default bucket and it's not that expandable (two different combo domain may have same leading segment). Moreover, the initial default bucket("l") will not be used, because all requests should have a HOST.
          2. sub-file's path need to contain querystring, i.e. question mark("?") is part of the file path, not the delimiter http://pastebin.com/HvMJBQw0
            We use querystring to version each single sub-file in the combined url. If we want to update/purge one of them, it can be simply accomplished by changing the version of sub-file. (If not, you have to purge both the combined url and sub-file url which is relatively hard to know the latter one when you are not very familiar with ATS. Of course you can alter the filename if possible in your site.)
            Then he combo url could be like http://example.com/combo?file1?v=2012&file2?v=2013
          3. request hangs when combo url has no querystring http://pastebin.com/d34ZJDzQ
          4. make plugin per-remap enabled/disabled http://pastebin.com/YTaDYvh2
            It's implemented by adding some remap code and make global part "intercepted" in TS_EVENT_HTTP_OS_DNS instead of TS_EVENT_HTTP_READ_REQUEST_HDR in order to read the flag set in TSRemapDoRemap.
            So remap.config will be:
            map    http://example.com   http://os.example.com @plugin=combo_handler.so
            map    http://localhost/example.com   http://os.example.com
            map    http://other.com  http://os.other.com  # combo for this channel is disabled
            
          5. limit sub-file max count and querystring length for potential problems http://pastebin.com/cmBCuCNB
          6. log failed url http://pastebin.com/bNezeaz0

          They were tested on 3.0.x. Suppose you've made it compiled in lastest master. You can select to review.
          Just took a glance, my code compiled failed with lastest esi(but I'm sure it compiles last winter). So I have no appropriate patchset and sorry that I'm too busy to look into it these days.

          Show
          Conan Wang added a comment - Sorry, I miss your comments. +1 for combination. I've made some changes after those old attachments. Some of them may be not general for our users. So I have no ideas how to update this ticket. Changes I made (separately pasted on pastebin for convenience and most are minor changes): use HOST header as default bucket http://pastebin.com/pGHfLaHR Original code use the first segment of Host as the default bucket and it's not that expandable (two different combo domain may have same leading segment). Moreover, the initial default bucket("l") will not be used, because all requests should have a HOST. sub-file's path need to contain querystring, i.e. question mark("?") is part of the file path, not the delimiter http://pastebin.com/HvMJBQw0 We use querystring to version each single sub-file in the combined url. If we want to update/purge one of them, it can be simply accomplished by changing the version of sub-file. (If not, you have to purge both the combined url and sub-file url which is relatively hard to know the latter one when you are not very familiar with ATS. Of course you can alter the filename if possible in your site.) Then he combo url could be like http://example.com/combo?file1?v=2012&file2?v=2013 request hangs when combo url has no querystring http://pastebin.com/d34ZJDzQ make plugin per-remap enabled/disabled http://pastebin.com/YTaDYvh2 It's implemented by adding some remap code and make global part "intercepted" in TS_EVENT_HTTP_OS_DNS instead of TS_EVENT_HTTP_READ_REQUEST_HDR in order to read the flag set in TSRemapDoRemap. So remap.config will be: map http: //example.com http://os.example.com @plugin=combo_handler.so map http: //localhost/example.com http://os.example.com map http: //other.com http://os.other.com # combo for this channel is disabled limit sub-file max count and querystring length for potential problems http://pastebin.com/cmBCuCNB log failed url http://pastebin.com/bNezeaz0 They were tested on 3.0.x. Suppose you've made it compiled in lastest master. You can select to review. Just took a glance, my code compiled failed with lastest esi(but I'm sure it compiles last winter). So I have no appropriate patchset and sorry that I'm too busy to look into it these days.
          Hide
          Leif Hedstrom added a comment -

          Cool! I haven't landed your fixes for this yet, however, I hope to do so just after we release v3.3.2 (next week). Once that's done, lets land all these changes. Would you mind filing either one bug for all of the above, or individual bugs? Either is fine.

          Show
          Leif Hedstrom added a comment - Cool! I haven't landed your fixes for this yet, however, I hope to do so just after we release v3.3.2 (next week). Once that's done, lets land all these changes. Would you mind filing either one bug for all of the above, or individual bugs? Either is fine.
          Hide
          Conan Wang added a comment -

          filed TS-1827. After you land TS-1053, I may help with TS-1827 which is simple enough. But I have no test environment and much time recently ;(

          Show
          Conan Wang added a comment - filed TS-1827 . After you land TS-1053 , I may help with TS-1827 which is simple enough. But I have no test environment and much time recently ;(
          Hide
          ASF subversion and git services added a comment -

          Commit 21515f600a33fd4b4e1e28bd88b0b69854180c5b in branch refs/heads/master from Leif Hedstrom
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=21515f6 ]

          TS-1053 Move the README for combo handler

          Show
          ASF subversion and git services added a comment - Commit 21515f600a33fd4b4e1e28bd88b0b69854180c5b in branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=21515f6 ] TS-1053 Move the README for combo handler
          Hide
          ASF subversion and git services added a comment -

          Commit 0012eee3b43f736737062e10267f423a156c35d5 in branch refs/heads/master from Leif Hedstrom
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=0012eee ]

          TS-1053 Cleaning this up, since I was mucking around in it.

          Show
          ASF subversion and git services added a comment - Commit 0012eee3b43f736737062e10267f423a156c35d5 in branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=0012eee ] TS-1053 Cleaning this up, since I was mucking around in it.
          Hide
          ASF subversion and git services added a comment -

          Commit 27fb7b7a1d720b86a418c820a216c0ffe31411ae in branch refs/heads/master from Leif Hedstrom
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=27fb7b7 ]

          Added TS-1053.

          Show
          ASF subversion and git services added a comment - Commit 27fb7b7a1d720b86a418c820a216c0ffe31411ae in branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=27fb7b7 ] Added TS-1053 .
          Hide
          ASF subversion and git services added a comment -

          Commit ee04a10dc592065abf534d408b2685e4c588a19a in branch refs/heads/master from Leif Hedstrom
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=ee04a10 ]

          TS-1053 Move combo_handler to ESI, also change plugin.cc to esi.cc

          Show
          ASF subversion and git services added a comment - Commit ee04a10dc592065abf534d408b2685e4c588a19a in branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=ee04a10 ] TS-1053 Move combo_handler to ESI, also change plugin.cc to esi.cc
          Hide
          ASF subversion and git services added a comment -

          Commit 7f7eddf57065996df936a372681341ce7c637dd8 in branch refs/heads/master from Conan Wang
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=7f7eddf ]

          TS-1053 Make combo_handler compiler.

          Show
          ASF subversion and git services added a comment - Commit 7f7eddf57065996df936a372681341ce7c637dd8 in branch refs/heads/master from Conan Wang [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=7f7eddf ] TS-1053 Make combo_handler compiler.
          Hide
          Leif Hedstrom added a comment -

          Conan, I've resolved this, so feel free to rebase TS-1827 and I'll merge that sucker in too.

          Show
          Leif Hedstrom added a comment - Conan, I've resolved this, so feel free to rebase TS-1827 and I'll merge that sucker in too.
          Hide
          ASF subversion and git services added a comment -

          Commit da80e34b6aaf442c481d477aa2f55a07bf7b7806 in branch refs/heads/master from Leif Hedstrom
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=da80e34 ]

          TS-1053 Make combo_handler compile, also sanitize proper usage of ink_port.h

          Show
          ASF subversion and git services added a comment - Commit da80e34b6aaf442c481d477aa2f55a07bf7b7806 in branch refs/heads/master from Leif Hedstrom [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=da80e34 ] TS-1053 Make combo_handler compile, also sanitize proper usage of ink_port.h
          Hide
          Conan Wang added a comment -

          Leif, after making esi and combo_handler share code, I need to write both esi.so and combo_handler.so in plugins.config to make the combo_handler work normally.

          If only enable combo_handler.so, it'd end up with:

          ERROR: unable to load '/Users/conan/box/ts-trunk/libexec/trafficserver/combo_handler.so': dlopen(/Users/conan/box/ts-trunk/libexec/trafficserver/combo_handler.so, 2): Symbol not found: _threadKey
            Referenced from: /Users/conan/box/ts-trunk/lib/libesi.0.dylib
            Expected in: flat namespace
           in /Users/conan/box/ts-trunk/lib/libesi.0.dylib
          

          1. If we have to configure like this(enable both though only need combo's feature), do we need a way to disable the function of esi?

          2. configuring both still doesn't work for my remap patch in TS-1827(as I commended there).

          Show
          Conan Wang added a comment - Leif, after making esi and combo_handler share code, I need to write both esi.so and combo_handler.so in plugins.config to make the combo_handler work normally. If only enable combo_handler.so, it'd end up with: ERROR: unable to load '/Users/conan/box/ts-trunk/libexec/trafficserver/combo_handler.so': dlopen(/Users/conan/box/ts-trunk/libexec/trafficserver/combo_handler.so, 2): Symbol not found: _threadKey Referenced from: /Users/conan/box/ts-trunk/lib/libesi.0.dylib Expected in: flat namespace in /Users/conan/box/ts-trunk/lib/libesi.0.dylib 1. If we have to configure like this(enable both though only need combo's feature), do we need a way to disable the function of esi? 2. configuring both still doesn't work for my remap patch in TS-1827 (as I commended there).
          Hide
          James Peach added a comment -

          Automake (at least some versions) gets confused because there is a module named 'esi' and a convenience library named 'libesi'. I have a patch pending.

          Show
          James Peach added a comment - Automake (at least some versions) gets confused because there is a module named 'esi' and a convenience library named 'libesi'. I have a patch pending.
          Hide
          ASF subversion and git services added a comment -

          Commit f3369df37419e77fb4bcbd26183cdd4fc4de5fb1 in branch refs/heads/master from James Peach
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=f3369df ]

          TS-1053: fix sdpy and esi plugin convenience libraries

          Rename the convenience libraries to avoid potential name conflicts.
          Make sure to use noinst_ automake prefixes because we don't want
          these to be installed.

          Show
          ASF subversion and git services added a comment - Commit f3369df37419e77fb4bcbd26183cdd4fc4de5fb1 in branch refs/heads/master from James Peach [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=f3369df ] TS-1053 : fix sdpy and esi plugin convenience libraries Rename the convenience libraries to avoid potential name conflicts. Make sure to use noinst_ automake prefixes because we don't want these to be installed.
          Hide
          ASF subversion and git services added a comment -

          Commit c4815b07738746163d1d885091a22b67871d2e0d in branch refs/heads/master from James Peach
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=c4815b0 ]

          TS-1053: fix missing threadKey symbol in combo_handler

          Show
          ASF subversion and git services added a comment - Commit c4815b07738746163d1d885091a22b67871d2e0d in branch refs/heads/master from James Peach [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=c4815b0 ] TS-1053 : fix missing threadKey symbol in combo_handler
          Hide
          Conan Wang added a comment -

          thanks James, it work well by only configuring "combo_handler.so" in plugins.config

          Show
          Conan Wang added a comment - thanks James, it work well by only configuring "combo_handler.so" in plugins.config
          Hide
          ASF subversion and git services added a comment -

          Commit e4e911bd5eb6e4837d8568bdfa4889883e2fa1f6 in branch refs/heads/master from James Peach
          [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=e4e911b ]

          TS-1053: fix esi plugin unit test linkage

          Show
          ASF subversion and git services added a comment - Commit e4e911bd5eb6e4837d8568bdfa4889883e2fa1f6 in branch refs/heads/master from James Peach [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=e4e911b ] TS-1053 : fix esi plugin unit test linkage

            People

            • Assignee:
              Leif Hedstrom
              Reporter:
              Conan Wang
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development