Github user ijokarumawak commented on the issue:

    https://github.com/apache/nifi/pull/1405
  
    I was testing this PR using Amazon Linux.
    Checking if I can refer ${NIFI_HOME} environmental value via Attribute 
Expression Language, before and after applying the patch. I set run.as = 
'nifi', and execute `bin/nifi.sh start` by root user.
    
    ```properties
    # conf/bootstrap.conf
    run.as=nifi
    ```
    
    NiFi flow is simple as: `GenerateFlowFile` using dynamic attribute as 
`nifi.home` = `${NIFI_HOME}`, also I added `lang` = `${LANG}` to make sure that 
it can refer OS env values via VariableRegistry.
    
    ## Result: Without this PR
    
    ```properties
    nifi.home=(Empty string)
    lang=en_US.UTF-8
    ```
    
    NIFI_HOME was not retrieved as expected.
    
    ## Result: With this PR
    
    ```properties
    nifi.home=/mnt
    lang=en_US.UTF-8
    ```
    
    Although NIFI_HOME was retrieved, the value was not the expected one. It 
should be `/mnt/nifi-1.2.0-SNAPSHOT` but it was just `/mnt`.
    
    I also found that without `run.as` property, nifi.sh doesn't work with this 
PR. It seems Command argument is not passed properly to RunNiFi:
    
    ```bash
    [root@ip-172-31-20-144 nifi-1.2.0-SNAPSHOT-root]# ./bin/nifi.sh status
    Java home: /usr/lib/jvm/jre
    NiFi home: /mnt/nifi-1.2.0-SNAPSHOT-root
    Bootstrap Config File: /mnt/nifi-1.2.0-SNAPSHOT-root/conf/bootstrap.conf
    Usage:
    java org.apache.nifi.bootstrap.RunNiFi [<-verbose>] <command> [options]
    Valid commands include: ...
    ```
    
    I will keep investigating what's going on but would like to share current 
status. Please let me know if you noticed something.
    
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to