fix: change DISK_ to DRIVE_ for some drive related envs (#18005)

This commit is contained in:
Harshavardhana
2023-09-11 12:19:22 -07:00
committed by GitHub
parent e3fbcaeb72
commit 9878031cfd
4 changed files with 19 additions and 7 deletions

View File

@@ -664,10 +664,14 @@ func handleCommonEnvVars() {
logger.Fatal(config.ErrInvalidFSOSyncValue(err), "Invalid MINIO_FS_OSYNC value in environment variable")
}
if rootDiskSize := env.Get(config.EnvRootDiskThresholdSize, ""); rootDiskSize != "" {
rootDiskSize := env.Get(config.EnvRootDriveThresholdSize, "")
if rootDiskSize == "" {
rootDiskSize = env.Get(config.EnvRootDiskThresholdSize, "")
}
if rootDiskSize != "" {
size, err := humanize.ParseBytes(rootDiskSize)
if err != nil {
logger.Fatal(err, fmt.Sprintf("Invalid %s value in environment variable", config.EnvRootDiskThresholdSize))
logger.Fatal(err, fmt.Sprintf("Invalid %s value in root drive threshold environment variable", rootDiskSize))
}
globalRootDiskThreshold = size
}