diff --git a/src/DIRAC/WorkloadManagementSystem/Client/DownloadInputData.py b/src/DIRAC/WorkloadManagementSystem/Client/DownloadInputData.py index 3ded1d0eb8e..d65c1b6c59c 100644 --- a/src/DIRAC/WorkloadManagementSystem/Client/DownloadInputData.py +++ b/src/DIRAC/WorkloadManagementSystem/Client/DownloadInputData.py @@ -5,7 +5,8 @@ import random import tempfile -from DIRAC import S_ERROR, S_OK, gLogger +from DIRAC import S_ERROR, S_OK, gConfig, gLogger +from DIRAC.ConfigurationSystem.Client.PathFinder import getSystemSection from DIRAC.Core.Utilities.Os import getDiskSpace from DIRAC.Core.Utilities.ReturnValues import returnSingleResult from DIRAC.DataManagementSystem.Utilities.DMSHelpers import DMSHelpers @@ -227,9 +228,9 @@ def __checkDiskSpace(self, totalSize): """ diskSpace = getDiskSpace(self.__getDownloadDir(False)) # MB availableBytes = diskSpace * 1024 * 1024 # bytes - # below can be a configuration option sent via the job wrapper in the future - # Moved from 3 to 5 GB (PhC 130822) for standard output file - bufferGBs = 5.0 + bufferGBs = gConfig.getValue( + os.path.join(getSystemSection("WorkloadManagement/JobWrapper"), "JobWrapper", "InputDataBufferGBs"), 5.0 + ) data = bufferGBs * 1024 * 1024 * 1024 # bufferGBs in bytes if (data + totalSize) < availableBytes: msg = f"Enough disk space available ({availableBytes} bytes)" diff --git a/tests/Jenkins/dirac-cfg-update-server.py b/tests/Jenkins/dirac-cfg-update-server.py index 50ac98a3a24..b45b2e767ff 100644 --- a/tests/Jenkins/dirac-cfg-update-server.py +++ b/tests/Jenkins/dirac-cfg-update-server.py @@ -557,6 +557,8 @@ # to avoid having to wait while testing rescheduling csAPI.setOption("Systems/WorkloadManagement/Production/Executors/Optimizers/JobScheduling/RescheduleDelays", "0") +csAPI.createSection("Systems/WorkloadManagement/Production/JobWrapper/") +csAPI.setOption("Systems/WorkloadManagement/Production/JobWrapper/InputDataBufferGBs", 1) # Final action: commit in CS res = csAPI.commit()