Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cvo: When the CVO restarts, perform one final sync to write status
When we upgrade the CVO causes itself to reboot by updating the deployment. The CVO gets signalled with SIGTERM and then releases the leader lease. However, there is no guarantee the latest status of the CVO has been flushed to the cluster version object which can mean the "verified: true" flag that the sync worker calculates when it retrieves the payload doesn't get written. The new CVO pod loads from the payload and so doesn't have the verified flag. While in the future we may want to completely decouple verification from payload retrieval (background worker that verifies available updates as well as checks historical records), for now we need to ensure the loaded state is persisted to the CV. Since there may be useful human information available about the payload that a failed new CVO pod might not get a chance to write, alter the CVO sync loop to perform one final status sync during shutdown, and increase the amount of time we wait before hard shutdown to 5s to give it more room to happen.
- Loading branch information