Member since
04-05-2024
4
Posts
1
Kudos Received
0
Solutions
04-22-2024
12:58 PM
@MattWho You will see this behavior even if you don't use docker only nifi standard binaries. I validated this copying those dirs below from 1.25.0 installation to 2.0.0-M2 installation both without using docker. conf/ content_repository/ database_repository/ flowfile_repository/ provenance_repository/ state/ Thank you again
... View more
04-22-2024
11:02 AM
Hi @MattWho About your questions Can you share some details on which specific components you are using that appear to lose state after upgrade? All processors even the valid ones Did you test out your dataflow after upgrading to 1.25.0? Yes it works as expected Was state still working correctly before migrating then to 2.0.0-M2? Yes, the problem only happens when upgrading from 1.25.0 to 2.0.0-M2 (I tried M1 too, same problem 😕) To help with this I created a flow to reproduce the problem it will require docker. # Setup nifi 1.25.0 installation
mkdir nifi_upgrade_test
docker run -d --rm -v ./nifi_upgrade_test:/nifi_upgrade_test -d -p 8443:8443 --name nifi apache/nifi:1.25.0
## wait until nifi starts
## It can be checked with docker logs nifi -f
docker exec nifi /opt/nifi/nifi-current/bin/nifi.sh set-single-user-credentials admin supersecret1
docker restart nifi
# go https://localhost:8443/nifi/
# user: admin
# pass: supersecret1
# Create a "dummy" state
# 1) Add two processors GenerateFlowFile and UpdateAttribute
# 2) Add relationship GenerateFlowFile -> success -> UpdateAttribute
# 3) UpdateAttribute: add a property called "something" with value "${getStateValue("something"):plus(1)}"
# 4) UpdateAttribute: update property "Store State" to "Store state locally"
# 5) UpdateAttribute: update property "Stateful Variables Initial Value" to 0
# 6) UpdateAttribute: update "success" and "set state fail" relationship to terminate
# 7) Run once both processors first GenerateFlowFile and then UpdateAttribute
# Now UpdateAttribute have state something=1
# Prepare migration: copy important files to /nifi_upgrade_test
docker exec nifi cp conf/ content_repository/ database_repository/ flowfile_repository/ provenance_repository/ state/ /nifi_upgrade_test -rv
docker kill nifi
# replace flow.xml.gz to flow.json.gz
sed -i "s/flow.xml.gz/flow.json.gz/g" nifi_upgrade_test/conf/nifi.properties
# volumes
# ./nifi_upgrade_test/conf:/opt/nifi/nifi-current/conf
# ./nifi_upgrade_test/content_repository:/opt/nifi/nifi-current/content_repository
# ./nifi_upgrade_test/database_repository:/opt/nifi/nifi-current/database_repository
# ./nifi_upgrade_test/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository
# ./nifi_upgrade_test/provenance_repository:/opt/nifi/nifi-current/provenance_repository
# ./nifi_upgrade_test/state:/opt/nifi/nifi-current/state
# ./nifi_upgrade_test:/nifi_upgrade_test
# Start nifi 2.0.0-M2 installation
docker run -d --rm -v ./nifi_upgrade_test/conf:/opt/nifi/nifi-current/conf -v ./nifi_upgrade_test/content_repository:/opt/nifi/nifi-current/content_repository -v ./nifi_upgrade_test/database_repository:/opt/nifi/nifi-current/database_repository -v ./nifi_upgrade_test/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository -v ./nifi_upgrade_test/provenance_repository:/opt/nifi/nifi-current/provenance_repository -v ./nifi_upgrade_test/state:/opt/nifi/nifi-current/state -v ./nifi_upgrade_test:/nifi_upgrade_test -d -p 8443:8443 --name nifi apache/nifi:2.0.0-M2
# go https://localhost:8443/nifi/ again
# user: admin
# pass: supersecret1 After migration the processors are still valid, but the states have been lost Thank you again
... View more
04-17-2024
06:03 AM
Hi @MattWho, Thank you for answering my question. It's a standalone installation The provider confs are - nifi.state.management.provider.local=local-provider - nifi.state.management.configuration.file=./conf/state-management.xml And isn't a cluster node - nifi.cluster.is.node=false I also didn't detected any changes on state-management.xml after updating to 2.0.0-M2. I detected changes after start the new version in /state/local files, I thought it could be some serialization changes, but I couldn't see major changes in state file format. I'm out of new ideas, my last one would be migrate the local state contents to zookeeper, then update, then migrate the states back to local, or keep on zookeeper, I don't know if this is possible, if is please provide me some directions. Thank you again
... View more
04-05-2024
11:22 AM
1 Kudo
Hi team! We are currently running a standalone nifi 1.13.2. Our upgrade strategy is 1.13.2 (outside docker) -> 1.25.0 (dockerized) -> 2.0.0-M2 (dockerized) Reference: https://cwiki.apache.org/confluence/display/NIFI/Migration+Guidance#MigrationGuidance-Migratingto2.0.0-M2 When we upgrade to 1.25.0 (dockerized) all states are still there, but after updating to 2.0.0-M2 (from 1.25.0) we no longer have the processor's states. Our docker volumes are these - /opt/nifi/nifi-current/database_repository:/opt/nifi/nifi-current/database_repository - /opt/nifi/nifi-current/flowfile_repository:/opt/nifi/nifi-current/flowfile_repository - /opt/nifi/nifi-current/content_repository:/opt/nifi/nifi-current/content_repository - /opt/nifi/nifi-current/provenance_repository:/opt/nifi/nifi-current/provenance_repository - /opt/nifi/nifi-current/state:/opt/nifi/nifi-current/state - /opt/nifi/nifi-current/logs:/opt/nifi/nifi-current/logs - /opt/nifi/nifi-current/conf:/opt/nifi/nifi-current/conf - /opt/nifi/nifi-current/extras:/opt/nifi/nifi-current/extras Any help would be appreciated! Thank you!
... View more
Labels:
- Labels:
-
Apache NiFi