I think the issue is that the way the logic works, it takes the class
name from flow.xml and then looks to see which bundles contain that
class name.

In your case, there are two bundles containing
org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService
- nifi-aws-nar 1.12.0
- your custom nar 1.0.0

So when it comes to the component that was from nifi-aws-nar 1.8.0, it
sees there are two bundles to choose from and neither are the exact
bundle from the flow.xml(1.8.0), so it doesn't know which is correct,
and therefore it creates a ghosted component.

I think you should be able to use the "Change Version" feature on the
service to change it from ghosted to 1.12.0, but I'm not 100% sure on
that.

Ideally we should improve the bundle selection logic so that instead
of just looking for bundles with that class name, it also looks for
the referenced group and artifact name and prefers those first.

On Wed, Oct 14, 2020 at 11:56 AM sanjeet rath <rath.sanj...@gmail.com> wrote:
>
> Hi All,
>
> I am facing one issue during the nifi cluster upgrade to 1.12 version from 
> 1.8 version.
>
> I have a custom processor for AWSCredentialsProviderControllerService 
> controller service. this has been build on top of 1.8 version . the structure 
> for custom processor in flow.xml.gz file is:
>
> <name>AWSCredentialsProviderControllerService100</name>  
> <class>org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService</class>
>
>    <bundle>
>         <group>com.xxx.xx1234</group>
>         <artifact>nifi-custom-ping-credentials-controller-service</artifact>
>         <version>1.0.0</version>
>       </bundle>
>
>
> There are also default AWSCredentialsProviderControllerService controller 
> service of 1.8version is present which is having below configuration in 
> flow.xml
>
> <name>AWSCredentialsProviderControllerService180</name>    
> <class>org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService</class>
>       <bundle>
>         <group>org.apache.nifi</group>
>         <artifact>nifi-aws-nar</artifact>
>         <version>1.8.0</version>
>
>
> So I am upgrading the nifi cluster , which means putting this flow.xml.gz 
> file from 1.8 cluster to 1.12 cluster .
>
> After the cluster up I am seeing the default 
> AWSCredentialsProviderControllerService(1.8 version) controller is not auto 
> upgraded to 1.12 bundle and getting invalid with error:
>
> Error:
>
> missing controller service validated against "any property" is invalid 
> because controler service of this type 
> org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService,
>  but this is not a valid reporting task type.
>
> log I am seeing :
>
> 2020-10-14 17:14:56,042 ERROR [main] o.a.nifi.controller.ExtensionBuilder 
> Could not create Controller Service of type 
> org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService
>  for ID 25defb18-0175-1000-5bb4-febb1b1a21db due to: Unable to find bundle 
> for coordinate org.apache.nifi:nifi-aws-nar:1.8.0; creating "Ghost" 
> implementation 2020-10-14 17:14:56,042 INFO [main] 
> o.a.nifi.groups.StandardProcessGroup 
> StandardControllerServiceNode[service=GhostControllerService[id=25defb18-0175-1000-5bb4-febb1b1a21db,
>  
> type=org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService],
>  versionedComponentId=null, 
> processGroup=StandardProcessGroup[identifier=8cb90667-0174-1000-8741-3bfe7f19db7f],
>  active=false] added to 
> StandardProcessGroup[identifier=8cb90667-0174-1000-8741-3bfe7f19db7f]
>
> There is no issue in the custom processor 
> (nifi-custom-ping-credentials-controller-service 1.0.0) as 1.0.0 version nar 
> file is present in the 1.12 cluster Also no issue with other 1.8 version 
> processor & controller service , all are auto upgraded to 1.12 version.
>
> Could you please let me know what should be done to avoid this type of issue 
> in upgrade?
>
>
> --
> Sanjeet Kumar Rath,
> mob- +91 8777577470
>

Reply via email to