Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle pruning of unhealthy db files on disk
In some corner cases when the DB pods are brought up by the daemonset, the ovn db file may exist. However, it may be in a state where it does not have itself as a valid raft node or hasn't joined the existing raft cluster and is therefore not having valid remote server addresses in the local instance. Our daemonset code assumes that if the db file exists, it has the right raft information present so that it can sync with other db instances and rebuild the db. In the above mentioned edge-case this doesn't hold true and eventually results in master/db pods that are continuously crash-looping. This change relies on the periodic cluster status check to ensure that the local db is part of the cluster (or is atleast a candidate for the cluster). If on 10 consecutive retries, the cluster status command errors out, the db file is deleted and the ovsdb-server container is correspondingly killed to be re-initialized by the daemonset. Signed-off-by: Aniket Bhat <anbhat@redhat.com>
- Loading branch information
1 parent
58453bd
commit cf4973a
Showing
1 changed file
with
62 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters