[ 
https://issues.apache.org/jira/browse/NIFI-6879?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcio Sugar updated NIFI-6879:
-------------------------------
    Description: 
This works fine in NiFi 1.7.1 but fails in NiFi 1.10.1.

Whenever I try to change the value of a variable that's defined outside a 
Process Group where it's used, NiFi fails during the Applying Updates with the 
following message (image also attached):
{noformat}
Variable Update Error
Unable to complete variable update request: Failed to update Variable Registry 
because failed while performing step: Applying updates to Variable 
Registry.{noformat}
To reproduce the problem:
 # On the top-level canvas, create a variable named "myvar", and set it to 
"{{blah}}".
 # Create a Process Group named "mypg".  Enter the group. 
 # Inside "mypg", add a GenerateFlowFile and set its "Run Schedule" to "1 day" 
to get just one flow file when it's started.
 # Still inside "mypg", add a LogMessage. Set its "Log prefix" to "{{MYLOG:}} " 
and its "Log message" to "{{My message is: '${myvar}'.}}"
 # Start both processors and see a message like this appeared in the 
application's log:  {{MYLOG: My message is: 'blah'.}}
 # Now leave the "mypg" Process Group and go back to the top-level canvas. Try 
to set the "myvar" variable to a different value, like "{{blah-blah}}". NiFi 
starts the steps to make the change, but fails during the "Applying Updates" 
step with the above error message. In the log, the following error message 
appears: 

{noformat}
ERROR [Variable Registry Update Thread] o.a.nifi.web.api.ProcessGroupResource 
Failed to update variable registry for Process Group with ID 
7f16c8da-016e-1000-aeb0-e65ea5e5f889
java.lang.IllegalStateException: Cannot update variable 'myvar' because it is 
referenced by 1 components that are currently running. {noformat}
Images and log file attached. The log file has the full exception trace.

 

  was:
This works fine in NiFi 1.7.1 but fails in NiFi 1.10.1.

Whenever I try to change the value of a variable that's defined outside a 
Process Group where it's used, NiFi fails during the Applying Updates with the 
following message (image also attached):
{noformat}
Variable Update Error
Unable to complete variable update request: Failed to update Variable Registry 
because failed while performing step: Applying updates to Variable 
Registry.{noformat}
To reproduce the problem:
 # On the top-level canvas, create a variable named "myvar", and set it to 
"{{blah}}".
 # Create a Process Group named "mypg".  Enter the group. 
 # Inside "mypg", add a GenerateFlowFile and set its "Run Schedule" to "1 day" 
to get just one flow file when it's started.
 # Still inside "mypg", add a LogMessage. Set its "Log prefix" to "{{MYLOG:}} " 
and its "Log message" to "{{My message is: '${myvar}'.}}"
 # Start both processors and see a message like this appeared in the 
application's log:  {{MYLOG: My message is: 'blah'.}}
 # Now leave the "mypg" Process Group and go back to the top-level canvas. Try 
to set the "myvar" variable to a different value, like "{{blah-blah}}". NiFi 
starts the steps to make the change, but fails during the "Applying Updates" 
step with the above error message.

Images and log file attached.

 


> Variable Updater Error when trying to change variable used inside a Process 
> Group
> ---------------------------------------------------------------------------------
>
>                 Key: NIFI-6879
>                 URL: https://issues.apache.org/jira/browse/NIFI-6879
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.10.0
>         Environment: Host OS: Ubuntu 16.04
> Docker version 19.03.4, build 9013bf583a
> Docker Image: apache/nifi 1.10.0 4310dad3312f
>            Reporter: Marcio Sugar
>            Priority: Major
>
> This works fine in NiFi 1.7.1 but fails in NiFi 1.10.1.
> Whenever I try to change the value of a variable that's defined outside a 
> Process Group where it's used, NiFi fails during the Applying Updates with 
> the following message (image also attached):
> {noformat}
> Variable Update Error
> Unable to complete variable update request: Failed to update Variable 
> Registry because failed while performing step: Applying updates to Variable 
> Registry.{noformat}
> To reproduce the problem:
>  # On the top-level canvas, create a variable named "myvar", and set it to 
> "{{blah}}".
>  # Create a Process Group named "mypg".  Enter the group. 
>  # Inside "mypg", add a GenerateFlowFile and set its "Run Schedule" to "1 
> day" to get just one flow file when it's started.
>  # Still inside "mypg", add a LogMessage. Set its "Log prefix" to "{{MYLOG:}} 
> " and its "Log message" to "{{My message is: '${myvar}'.}}"
>  # Start both processors and see a message like this appeared in the 
> application's log:  {{MYLOG: My message is: 'blah'.}}
>  # Now leave the "mypg" Process Group and go back to the top-level canvas. 
> Try to set the "myvar" variable to a different value, like "{{blah-blah}}". 
> NiFi starts the steps to make the change, but fails during the "Applying 
> Updates" step with the above error message. In the log, the following error 
> message appears: 
> {noformat}
> ERROR [Variable Registry Update Thread] o.a.nifi.web.api.ProcessGroupResource 
> Failed to update variable registry for Process Group with ID 
> 7f16c8da-016e-1000-aeb0-e65ea5e5f889
> java.lang.IllegalStateException: Cannot update variable 'myvar' because it is 
> referenced by 1 components that are currently running. {noformat}
> Images and log file attached. The log file has the full exception trace.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to