Manoj Samel created SLIDER-1056:
-----------------------------------

             Summary: Component export evaluates only numeric parameters
                 Key: SLIDER-1056
                 URL: https://issues.apache.org/jira/browse/SLIDER-1056
             Project: Slider
          Issue Type: Bug
          Components: core
    Affects Versions: Slider 0.80
            Reporter: Manoj Samel


Slider 0.80 on secured cluster. Each component exports its host/port and some 
other info

I am looking @ exported values at 
http://host:1025/ws/v1/slider/publisher/slider/componentinstancedata         

1 - Just export host/port - This works

<componentExports>
  <componentExport>
    <name>my_info</name>
    <value>${THIS_HOST}:${site.global.abc.http_port}</value>
 </componentExport>
</componentExports>

2 - Export host/port and ** APPEND some constant - This works

<componentExports>
  <componentExport>
    <name>my_info</name>
    <value>${THIS_HOST}:${site.global.abc.http_port}:XYZ</value>
  </componentExport>
</componentExports>

3 - Try host/port/other info derived from param. In this case, 
${site.global.abc.http_port} gets evaluated correctly in export but 
${site.global.abc.some_other_info} appears as is - that is it does not gets 
evaluated in export. *** NOTE ${site.global.abc.some_other_info} evaluates to a 
non-numeric value

<componentExports>
  <componentExport>
    <name>my_info</name>    
 
<value>${THIS_HOST}:${site.global.abc.http_port}:${site.global.abc.some_other_info}</value>
  </componentExport>
</componentExports>

Digging further into this, it appears that  only the variables that expand to a 
number are allowed - I can add another port to it and that export works 

<value>${THIS_HOST}:${site.global.abc.http_port}:${site.global.abc.some_other_port}</value>

It should be possible to evaluate non-numeric dynamic parameters during export. 
These could be small & critical bits of info that does not violates the 
principle of limiting size of ZK info - so not allowing non-numeric values just 
to limit ZK data does not makes sense.

If slider wants to enforce ZK data size limit, it should evaluate the variables 
and error out of result is less that certain (documented) size ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to