-
Notifications
You must be signed in to change notification settings - Fork 276
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
Nighlt OOD preview version has an incomplete update #236
Comments
This should be the problem of inconsistent service version update of ood-daemon ood-daemon follows the following process when updating the version1. Read the service version list of the current oodThe purpose of this is to get a version list with the expected version of each service, usually read from the meta chain, but it can also be configured completely locally If pulled from the chain, it is currently the CYFS/src/component/cyfs-core/src/app/app_list.rs Lines 91 to 92 in 485b0c1
2. Select the version of the serviceThis is to pull the list of available versions of each service from the meta chain, which itself is a Every time an available version of the service is released, it will be updated to this DecApp object and republished to the chain CYFS/src/component/cyfs-core/src/app/dec_app.rs Lines 128 to 129 in 485b0c1
Caching problem of update mechanismWhen ood-daemon checks for updates each time, it first gets the service list version, and if it is inconsistent with local, then it gets the DecApp object of each service in turn, which has a cache design in order to avoid frequent requests to the meta chain, and the current cache time is 4 hours, and the related code is as follows CYFS/src/service/ood-daemon/src/config_repo/meta.rs Lines 142 to 158 in 485b0c1
So in ood-daemon's view, the list of available versions of a service is fixed for a period of time, and even if the DecApp object of this service is updated during this period of time, it will not be updated to the chain immediately The current solutionSo your problem should be different service, pull to the different versions released before and after, and then the local cache exists, resulting in not timely update to the newly released version, to solve this problem can use the following two methods 1. Wait for a whileGenerally speaking, the update check is not a very sensitive operation, and the frequency is low-frequency operation, so the internal cache will be invalidated after waiting for at most 4 hours, thus updating to the latest service DecApp from the chain. 2. Restart ood-daemonThe above cache is only a memory cache, so after restarting ood-daemon, the cache will naturally cease to exist and the update mechanism will work from scratch, pulling the latest version information from the chain |
But this does have some inconsistency problems, consider our service version release scenario: For a set of service inside a version list, each time a version is released, the DecApp objects of the updated service are serial, if this overall time interval is long, then there may be an intermediate state, in the middle of the release, part of the service DecApp objects are already in effect, resulting in ood- daemon sees the intermediate state from the meta chain If possible, a group of service DecApp objects should be publish to meta chain at the same time, preferably in the same block, to avoid the ood-daemon seeing the intermediate state. @weiqiushi |
This problem only occurs when service_version is configured as something other than "default". In this configuration, each service is treated as having a separate version line, and they are checked for updates separately. This is also in line with the design principle. Because in the future, each service may be updated independently instead of uniformly as it is now When service_version is configured as "default", ood-daemon decides the local service version by checking the service list in the chain. When the official service list is published, the OOD service version alignment is ensured and the above situation will not happen |
In fact, the key to this problem lies in whether the service-list configured by ood-daemon is an explicit version or some wildcard version based on semver rules, such as *, 1.0 and other non-specific versions; for explicit specific versions, when inconsistency of service DecApp occurs, the update cycle of ood-daemon may be failed with error, but it will not update to the inconsistent version; but for rule-based version configuration, it may leave ood-daemon in an "intermediate state" of the local version of service DecApp. So for rule-based version configuration, it is possible that ood-daemon is in an "intermediate state" of services, where some services are new and some other services are still old So we still need to consider the consistency as much as possible when we publish the DecApp of our service list |
So in the long run, we need to optimize the process of releasing service, we need to ensure that all service object updates on the meta chain are atomic in one release, that is, they need to be done in one block, and multiple service objects need to be packaged into one transaction when they are on the chain, so it may involve The following optimizations and changes are possible
|
Relevant optimizations are tracked in the following issue: |
Describe the bug
I found that the version update on my OOD is incomplete, some services are 744, some services are 750, and they have not been updated to the latest version 753
Details
To Reproduce
occasional problem
Expected behavior
System information
OS : Debian
ood-daemon_699_rCURRENT.log
The text was updated successfully, but these errors were encountered: