Use retry mechanism when initializing configuration (#6475)
Currently, one node in a cluster can fail to boot with the following error message: ``` ERROR Unable to initialize config system: Storage resources are insufficient for the write operation ``` This happens when disks are formatted, read quorum is met but write quorum is not met. In checkServerConfig(), a insufficient read quorum error is replaced by errConfigNotFound, the code will generate a new config json and try to save it, but it will fail because write quorum is not met. Replacing read quorum with errConfigNotFound is also wrong because it can lead, in rare cases, to overwrite the config set by the user. So, this commit adds a retry mechanism in configuration initialization to retry only with read or write quorum errors. This commit will also fix the following cases: - Read quorum is lost just after the initialization of the object layer. - Write quorum not met when upgrading configuration version.master
parent
a63bc9254d
commit
66fda7a37f
Loading…
Reference in new issue