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

ASF GitHub Bot commented on NIFI-5027:
--------------------------------------

Github user pvillard31 commented on the issue:

    https://github.com/apache/nifi/pull/2604
  
    Did multiple tests with different scenarios (I attached to the JIRA a 
template to test each scenario - cannot attached an XML file here).
    
    **Test 1** - Normal case, processors relying on a single CS correctly 
configured.
    => Working as expected.
    ````
    #> nifi pg-enable-services -pgid &1 -u http://localhost:8080/
    Currently 0 enabled services and 1 disabled services, attempting to enable 
services...
    Currently 1 services are enabling, waiting to finish before proceeding...
    Currently 1 enabled services and 0 disabled services, attempting to enable 
services...
    
    Finished with 1 enabled services and 0 disabled services
    
    No more services could be enabled, exiting...
    ````
    
    **Test 2** - Misconfigured CS that cannot be enabled.
    => One remark: no information regarding why the CS cannot be enabled. 
Ideally, providing the reason why the CS cannot be enabled would be great (like 
in the tooltip), not sure we have the info though. But at least saying that the 
CS "x" cannot be enabled, no?
    ````
    #> nifi pg-enable-services -pgid &2 -u http://localhost:8080/
    
    Using a positional back-reference for 'Test 2 - Misconfigured CS'
    Currently 0 enabled services and 1 disabled services, attempting to enable 
services...
    
    Finished with 0 enabled services and 1 disabled services
    
    No more services could be enabled, exiting...
    ````
    
    **Test 3** - CS referencing another CS
    => Working as expected.
    ````
    #> nifi pg-enable-services -pgid &3 -u http://localhost:8080/
    
    Using a positional back-reference for 'Test 3 - CS referencing CS'
    Currently 0 enabled services and 3 disabled services, attempting to enable 
services...
    Currently 1 services are enabling, waiting to finish before proceeding...
    Currently 2 enabled services and 1 disabled services, attempting to enable 
services...
    Currently 1 services are enabling, waiting to finish before proceeding...
    Currently 3 enabled services and 0 disabled services, attempting to enable 
services...
    
    Finished with 3 enabled services and 0 disabled services
    
    No more services could be enabled, exiting...
    ````
    
    **Test 4** - No CS to start for the process group.
    => Working as expected.
    ````
    #> nifi pg-enable-services -pgid &4 -u http://localhost:8080/
    
    Using a positional back-reference for 'Test 4 - No CS'
    Currently 0 enabled services and 0 disabled services, attempting to enable 
services...
    
    Finished with 0 enabled services and 0 disabled services
    
    No more services could be enabled, exiting...
    ````
    
    **Test 5** - CS relying on an unreferenced CS (distributed map cache client 
service / server) with a CS that cannot be properly started (distributed server 
trying to start on a port already used)
    => Would it be possible to say what CS is causing the issue? Also, once the 
command is looping, no way to kill it with ctrl+C, esc, etc. Not really a big 
issue, but just mentioning it.
    ````
    #> nifi pg-enable-services -pgid &5 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 5 - Not referenced CS'
    Currently 0 enabled services and 2 disabled services, attempting to enable 
services...
    Currently 1 services are enabling, waiting to finish before proceeding...
    Currently 1 services are enabling, waiting to finish before proceeding...
    Currently 1 services are enabling, waiting to finish before proceeding...
    Currently 1 services are enabling, waiting to finish before proceeding...
    ````
    
    **Test 6** - CS relying on an unreferenced CS (distributed map cache client 
service / server)
    => Working as expected.
    ````
    #> nifi pg-enable-services -pgid &6 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 6 - Not referenced CS'
    Currently 0 enabled services and 2 disabled services, attempting to enable 
services...
    Currently 2 enabled services and 0 disabled services, attempting to enable 
services...
    
    Finished with 2 enabled services and 0 disabled services
    
    No more services could be enabled, exiting...
    ````
    
    Then tried to disabled the CS, everything is working as expected. Could be 
nice to say how many CS have been disabled?
    ````
    #> nifi pg-disable-services -pgid &1 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 1 - Basic case'
    #> nifi pg-disable-services -pgid &2 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 2 - Misconfigured CS'
    #> nifi pg-disable-services -pgid &3 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 3 - CS referencing CS'
    #> nifi pg-disable-services -pgid &4 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 4 - No CS'
    #> nifi pg-disable-services -pgid &5 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 5 - Not referenced CS'
    #> nifi pg-disable-services -pgid &6 -u http://localhost:8080
    
    Using a positional back-reference for 'Test 6 - Not referenced CS'
    ````


> CLI - Add a command to start controller services
> ------------------------------------------------
>
>                 Key: NIFI-5027
>                 URL: https://issues.apache.org/jira/browse/NIFI-5027
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Tools and Build
>            Reporter: Pierre Villard
>            Assignee: Bryan Bende
>            Priority: Major
>         Attachments: TestStartStopCS.xml
>
>
> When importing a versioned process group from the registry, all the 
> components will be stopped (in case of update, only the newly added 
> components will be stopped). We already have a command pg-start to start a 
> process group, but it will fail if the process group relies on controller 
> services that should be enabled first.
> A new command like pg-enable-cs could be added, or just add a parameter/flag 
> to the pg-start command.
> Things to consider:
>  * there can be a dependency chain between the controller services requiring 
> to start the controller services in the right order. Example: the avro schema 
> registry CS and a reader/writer CS depending on the schema registry CS.
>  * there can be a CS defined at pg level that is not referenced by any 
> component inside the pg but that would need to be started nevertheless. 
> Example: the distributed map cache server CS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to