-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support update node location #995
Comments
It's already supported on the TFChain side. A node can update its location by calling the |
using i see we handle the uptime report with a separate endpoint tfchain/clients/tfchain-client-go/node.go Line 595 in 1c787e1
could we have a separate method that do the same for the location update? |
I can't understand why the node object can't be reconstructed each time we update the location. It's already used when the node boots up; it compares the real node info with the on-chain info. If they don't match, it calls update_node with the new info. for example, see this PR for a hint about how you can construct a node object
It is not optimal to have separate calls for every node property. If there are multiple inconsistencies, you would make multiple transactions to update the node object instead of one call. Since the requested functionality is already available and used by Zos for the same purpose, introducing an alternative way is not reasonable. |
my main concern was calculating the used resources while it maybe * during the update * get updated by another event deploying a workload but double checking we don't actually send the used resources while updating. my suggestion was to tweak the update_node method or add a new one to not require all the fields of the node but only update the fields that has value changed on the node object. a workaround instead of restructuring the node object locally, we could call the chain to get the node, compare with the new location if changed, overwrite with the new location and send back to the chain with the current update_node method. this will work fine for my case, so no work needed from the chain side. |
We need to support updating node locations.
changes on MaxMind Database lead to inconstant location data, threefoldtech/tfgrid-sdk-ts#3021 (comment)
threefoldtech/zos#2401
The text was updated successfully, but these errors were encountered: