You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.
What did you do?
We find that the NiFi operator sometimes fails to update the config specified by the user if it crashes and restarts at some particular point.
More concretely, the user can update the NiFi config by patching/updating the NifiCluster CR (e.g. set nifiProperties to nifi.ui.banner.text=xxx). Ideally, the NiFi operator will update the config delta to configmap, and restart the related NiFi pod later. Detailed steps are listed here:
the operator checks whether there is any config change from the CR spec. if there is change:
the operator updates configmap data to make it consistent with the CR spec
the operator updates ConfigOutofSync to CR status
the operator gets the CR status and check whether ConfigOutofSync is set. If true, it deletes the pod (nifi node), and restarts it in next round of reconcile
when the pod restarts, the operator sets CR status to ConfigInSync.
However, we find that if the operator crashes between step 2 and step 3 and restarts, the NiFi pod will never get restarted and the new config will never be populated to NiFi correctly. The reason is that after step 2, the configmap is already consistent with the CR spec, but the CR status is not set to ConfigOutofSync yet. After restart, the operator finds there is no change in step 1, and will never try to set ConfigOutofSync again.
What did you expect to see?
The NiFi pod starts to use the new config.
What did you see instead? Under which circumstances?
The new config is not reloaded successfully.
Possible Solution
A simple fix to this would be switching step 2 and step 3. In that case, the operator still knows the config is out of sync even if it crashes at the middle, and the config will be reloaded after the operator restarts.
Additional context
We are willing to send a PR to help fix this bug.
The text was updated successfully, but these errors were encountered:
srteam2020
changed the title
[BUG] NiFi config cannot be reloaded if the operator crashes in the middle of reconciliation
[BUG] NiFi config cannot be reloaded if the operator crashes and restarts in the middle of reconciliation
Sep 9, 2021
Bug Report
What did you do?
We find that the NiFi operator sometimes fails to update the config specified by the user if it crashes and restarts at some particular point.
More concretely, the user can update the NiFi config by patching/updating the NifiCluster CR (e.g. set
nifiProperties
tonifi.ui.banner.text=xxx
). Ideally, the NiFi operator will update the config delta toconfigmap
, and restart the related NiFi pod later. Detailed steps are listed here:configmap
data to make it consistent with the CR specConfigOutofSync
to CR statusConfigOutofSync
is set. If true, it deletes the pod (nifi node), and restarts it in next round of reconcileConfigInSync
.However, we find that if the operator crashes between step 2 and step 3 and restarts, the NiFi pod will never get restarted and the new config will never be populated to NiFi correctly. The reason is that after step 2, the
configmap
is already consistent with the CR spec, but the CR status is not set toConfigOutofSync
yet. After restart, the operator finds there is no change in step 1, and will never try to setConfigOutofSync
again.What did you expect to see?
The NiFi pod starts to use the new config.
What did you see instead? Under which circumstances?
The new config is not reloaded successfully.
Environment
Possible Solution
A simple fix to this would be switching step 2 and step 3. In that case, the operator still knows the config is out of sync even if it crashes at the middle, and the config will be reloaded after the operator restarts.
Additional context
We are willing to send a PR to help fix this bug.
The text was updated successfully, but these errors were encountered: