-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib/repo: Allow min-free-space-size and -percent to co-exist
Previously, we would error out if both of the options were mentioned in the config file (even if one of them is disabled with 0). There were few suggestions that this behavior was not quite right. Therefore, instead of throwing error and exiting, it's preferred to warn the user. Hence, the solution that worked out is: * Allow both options to exist simulateneously * Check each config's value and decide: * If both are present and are non-zero, warn the user. Also, prefer to use min-free-space-size over the another. * If both are absent, then use -percent=3% as fallback * Every other case is valid hence, no warning https://phabricator.endlessm.com/T13698 (cherry picked from commit be68991cf80f0aa1da7d36ab6e1d2c4d6c7cd3fb) Signed-off-by: Robert McQueen <rob@endlessm.com>
- Loading branch information
Umang Jain
committed
Jul 20, 2018
1 parent
7306577
commit 66a8d44
Showing
2 changed files
with
23 additions
and
12 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