openkfw / TruBudget

A blockchain-based workflow tool for efficient and transparent project management
https://openkfw.github.io/trubudget-website/
GNU General Public License v3.0
85 stars 41 forks source link

Partially complete beta node data provisioning in case of Alpha node connection/synchronization #1961

Open ZuitAMB opened 2 months ago

ZuitAMB commented 2 months ago

Description 😯

When running a multi node setup and connecting a new beta node to a pre existing alpha node, the connection and synchronization process takes some time. First, the alpha node needs to accept the join request. Second, the nodes have to synchronize the data, which also might take some time.

The provisioning service offers the possibility to provision data, like users.

In combination, the provisioning service might terminate, before the nodes are synchronized, which leads to the users not being provisioned. (Or if the blockchain is ready, after half of the users were tried to provision, only parts of the data would be provisioned.

How to reproduce 🕹

  1. Required alpha node (best case with some projects/data) running
  2. Configure a beta node to connect to the alpha and with some data for beta provisioning
  3. Start up the beta node
  4. Wait a few minutes before you accept the beta node and maybe check the provisioning logs to see failing provisioning attempts
  5. On the alpha node accept the be node
  6. Check the provisioning again, to see that remaining data is provisioned (after blockchain is synced)

Current workaround

It is possible to manually stop the provisioning container and start it, once the nodes are connected and synchronized. However, such a manual interaction is subpar.

Possible Fix/Solution

The beta node provisioning should wait until the blockchain node is ready (connected and synchronized)

Your Environment 🌎

Minimal Setup to reproduce the issue Tech Version
Frontend v2.14.0
API v2.14.0
Blockchain v2.14.0
Provisioning v2.14.0
jzakotnik commented 2 months ago

Thanks for the detailed description, we'll look at it!

SamuelPull commented 1 month ago

Might have been fixed by https://github.com/openkfw/TruBudget/pull/1983 ?

ZuitAMB commented 1 month ago

Yes, the provisioning improves might have fixed the issue. I will check it on our next Beta node connection.

galethil commented 1 month ago

@ZuitAMB can you confirm this was fixed by #1983 ? Or is there a need to further updates?