[ 
https://issues.apache.org/jira/browse/TC-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16118519#comment-16118519
 ] 

ASF GitHub Bot commented on TC-502:
-----------------------------------

GitHub user alficles opened a pull request:

    https://github.com/apache/incubator-trafficcontrol/pull/785

    [TC-502] ORT now skips file checks for remap plugin arguments that start 
with '-'.

    ORT parses the remap.config file to find dependent files to update.
    Since parameters to plugins aren't easily distinguished from options
    to those plugins, this distinguishes based on the first character.
    It's not ideal, but it works well in practice.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/alficles/incubator-trafficcontrol 
tc-502-ort-param-args

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-trafficcontrol/pull/785.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #785
    
----
commit e47b02afa238a22411b7824bc79dcbae110cb718
Author: Chris Lemmons <alfic...@gmail.com>
Date:   2017-08-08T15:44:08Z

    [TC-502] ORT now skips file checks for remap plugin arguments that start 
with '-'.
    
    ORT parses the remap.config file to find dependent files to update.
    Since parameters to plugins aren't easily distinguished from options
    to those plugins, this distinguishes based on the first character.
    It's not ideal, but it works well in practice.

----


> ORT fails to handle non-file arguments
> --------------------------------------
>
>                 Key: TC-502
>                 URL: https://issues.apache.org/jira/browse/TC-502
>             Project: Traffic Control
>          Issue Type: Bug
>          Components: Traffic Ops ORT
>            Reporter: Chris Lemmons
>
> ORT currently processes the parameters of all plugins on the remap.config 
> line as though they were files. However, parameters to `cachekey.config` are 
> parsed as parameters directly on the remap line. So, for example, if you have 
> a remap line that contains something like this:
> {{@plugin=cachekey.so @pparam=--remove-path=true}}
> That will cause ORT to attempt to load a config file named 
> {{--remove-path=true}}. ORT fails to accomplish this in several ways and 
> produces a variety of errors:
> DEBUG Starting processing of config file: --remove-path=true
> WARN --remove-path=true is being processed with an unknown service
> {code:none}
> INFO: ======== Start processing config file: --remove-path=true ========
> Use of uninitialized value in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2515.
> Use of uninitialized value $dir in -d at /opt/ort/traffic_ops_ort.pl line 645.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 648.
> /bin/mkdir: missing operand
> Try '/bin/mkdir --help' for more information.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 649.
> Use of uninitialized value $dir in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 653.
> Use of uninitialized value $dir in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 657.
> DEBUG Directory created: .
> Use of uninitialized value $result in pattern match (m//) at 
> /opt/ort/traffic_ops_ort.pl line 2482.
> Use of uninitialized value $size in numeric eq (==) at 
> /opt/ort/traffic_ops_ort.pl line 2488.
> Use of uninitialized value $url in concatenation (.) or string at 
> /opt/ort/traffic_ops_ort.pl line 2489.
> ERROR URL:  returned empty!
> {code}
> ORT should probably skip "files" that start with {{-}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to