Open ennui93 opened 6 years ago
Suggested enhancement would be to remove the incoming/outgoing connections to a given process group on undeploy, a behavior which should probably be configurable via a command-line option so as not to break cases where users may choose to deploy multiple templates into the same process group.
Thanks, Are you in a hurry for correction ?
I authored a stopgap solution. However, it does not accept any command-line parameter to toggle the behavior as discussed above. Additionally, it stops all components connected to a target process group, which may not be desirable for some users' scenarios since the connected components are not re-started again after the process group is removed. Lastly, the connected components to be stopped are limited to processors and local ports, and thus this will [potentially] not work for remote ports.
See: https://github.com/hermannpencole/nifi-config/compare/master...ennui93:issue-37
I have tested this against NiFi 1.0.1; but have not observed the behavior in the case of live data flowing through the system. There could be a bug whereby FlowFiles end up stuck in the queue of a connection to be deleted, and thus the undeploy operation fails when attempting to remove the non-empty connection. An improvement would be to stop connected components prior to stopping elements of the template itself.
It is not possible to run
nifi-config
in its undeploy mode when the process group in which a template is being removed is connected to other process groups. Tested on releasenifi-deploy-config-1.1.30
& 17411a859ddf450df32a1cd5a26503aaf6f129d9. There are two cases:Incoming connection
Outgoing connection