-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleans up files and stops k8s-dqlite on remove hook
cfg.Datastore.GetType() may return an empty string if the bootstrap action failed before database.SetClusterConfig has been called. Because of this, we're not removing the state dir for k8s-dqlite, which will be wrongfully removed by setup.K8sDqlite on the next bootstrap attempt. We're now opportunistically cleaning up the k8s-dqlite related state directory. Additionally, in the remove hook, we're ensuring that the PKI files exist, instead of removing them, contrary to what the log messages would also suggest. This addresses this issue as well. If a bootstrap attempt fails, the k8s-dqlite service will still be running, which will cause the next bootstrap attempt to fail, as the k8s-dqlite port will be currently in use.
- Loading branch information
1 parent
0cdeb87
commit ac8315e
Showing
2 changed files
with
9 additions
and
22 deletions.
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
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