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

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

Github user bbende commented on the issue:

    https://github.com/apache/nifi/pull/2604
  
    @pvillard31 thanks for the very thorough review, I'll take a look at some 
of these tomorrow and see what improvements can be made.
    
    Regarding the lack of feedback on some commands... 
    
    The way the enabling is implemented is by using a REST end-point that tells 
a process group to enable all of its controller services. So it checks how many 
are enabled, tells the PG to enable all, then checks how many are enabled, and 
basically when the # of enabled services stops changing then it means no more 
could be enabled, but the enable command isn't providing any response because 
it is an asynchronous command and doesn't know what was/wasn't enabled.
    
    So for #2 we don't really know which CS couldn't be enabled, we just know 
no more were enabled. Maybe when it finishes we can list the validation errors 
for all of the invalid services.
    
    For #5, the looping is something that can happen whenever any controller 
service gets stuck in the "enabling" state which can happen if it gets a stuck 
thread or an error. Right now it loops 120 times sleeping 1 second and then 
would break out and throw an error. This is obviously too long, but it is hard 
to say how long to wait, maybe 30 seconds?
    
    For disabling, it just fires off a call to a REST end point and tells a PG 
to disable all it's services. I can see if we can make additional calls to get 
the count before and after and give some info.
    
    Keeping in mind, all of the above info is only going to print in 
interactive mode. From standalone mode nothing is currently printed because I 
don't know if anything makes sense for someone writing a script.


> 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