Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-7489

resolveInheritedControllerServices doesn't connect all controller services



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.11.4
    • Fix Version/s: None
    • Labels:
    • Environment:
      Official NiFi Docker Container connected to Official NiFi Registry Container



      When I download versioned flows from NiFi Registry, sometimes it does not connect processors to controller services even though one exists in scope and it has the same name as the one it was originally connected to.

      Expected Behaviour

      NiFi downloads versioned process groups and connects external controller services correctly provided that a compatible controller service is available and has the same name.

      Actual Behaviour

      NiFi downloads versioned flows but does not connect all external controller services.

      Steps to reproduce:

      • Upload the attached template to your NiFi
      • Ensure the necessary Controller Services exist at the ROOT process group.
        • DistributedMapCacheClientService
        • AzureStorageCredentialsControllerService
        • DistributedMapCacheServer
      • Resolve all warnings on processors, maybe need to connect the above controller services.
      • Start version control on "Inner Versioned Flow"
      • Start version control on "Outer Versioned Flow"
      • Clear Canvas
      • Delete and Recreate the Controller Services
        • DistributedMapCacheClientService
        • AzureStorageCredentialsControllerService
        • DistributedMapCacheServer
      • Import "Outer Versioned Flow" from your registry

      You should observe that one processor in Inner Versioned Flow is invalid because it wasn't connected to an existing controller service and that the other processor is valid because by coincidence it shares the same dependency on an external controller service as the Outer Versioned Flow


      I believe the issue is that the code falls into this line here because the externalControllerServiceReferences is always set to that of the outermost versioned process group being imported even if the current process group being imported is versioned as well and has a different set of externalControllerServiceReferences

      A solution may be to make sure that externalControllerServiceReferences corresponds to the innermost versioned process group being worked on by resolveInheritedControllerServices().

      Another potential solution could be to make sure that outer versioned process groups' externalControllerServiceReferences is a superset of all the externalControllerServiceReferences from versioned process groups inside it.

      A good restriction to have might be not to allow Controller Services with the same name to exist in the same scope.




            • Assignee:
              esecules Eric Secules
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: