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
84 stars 39 forks source link

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

Open ZuitAMB opened 1 week ago

ZuitAMB commented 1 week 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 1 week ago

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