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.
---