Justin Gondron created NIFIREG-218:
--------------------------------------
Summary: Integrity issue when git flow provider fails
Key: NIFIREG-218
URL: https://issues.apache.org/jira/browse/NIFIREG-218
Project: NiFi Registry
Issue Type: Bug
Reporter: Justin Gondron
While working through https://github.com/apache/nifi-registry/pull/152, I came
across a related issue when using a git flow provider. It's possible to
successfully push a version from nifi to the registry, without it pushing to
github. When this happens, it appears to the nifi instance that the version was
pushed successfully, and on the registry side it has metadata in the database
about that version, but the corresponding flow file for that version will not
be in the repo. This means a few things:
* If you ever restart the registry host and try to rebuild it, there will be
lost changes.
* The registry will show a bucket or flow version that cannot actually be used
by a nifi instance
* You will be unable to delete the bucket and/or flow version via the registry
UI
One way to recreate:
* First, create the inconsistent state between an external database and flow
files
** Setup a read only user in your upstream repository
** Clone the repo into your registry using this user
** Configure the flow provider using this read only user
** Configure the registry to use an external db
** Start the registry
** Create a new bucket
** Push a version from Nifi to the registry using the new bucket
** It will appear to Nifi that the version was successfully committed
** The registry UI will show the new bucket and new flow
** The bucket/flow will not be in the upstream repository
* Recreate the registry instance
** Start a new registry service
** Configure the registry to use the same external db
** Configure the flow provider/clone the repo as before
** Start the registry
** The bucket/flow will appear in the registry UI, but you will be unable to
delete them and nifi instances will be unable to track to them since there are
no corresponding flow files
This is primarily an issue in a Docker environment where you're trying to
persist metadata to an external database and the flow files to github. But, I
can see this also occurring if you had problems pushing to github for an
indeterminate period of time and then had to perform an emergency restoration
of the registry.
Also, this may be related to https://issues.apache.org/jira/browse/NIFIREG-204,
not sure.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)