diff --git a/src/DIRAC/Resources/Computing/CloudComputingElement.py b/src/DIRAC/Resources/Computing/CloudComputingElement.py index 40f7e6459c6..0e0b96fa99e 100644 --- a/src/DIRAC/Resources/Computing/CloudComputingElement.py +++ b/src/DIRAC/Resources/Computing/CloudComputingElement.py @@ -401,7 +401,12 @@ def submitJob(self, executableFile, proxy, numberOfJobs=1): try: node = driver.create_node(**instParams) except Exception as err: - self.log.error("Failed to create_node", str(err)) + errMsg = str(err) + # sometimes cloud returns complete user_data which is too long for + # a sensible log message + if len(errMsg) > 256: + errMsg = f"{errMsg[:128]}...{errMsg[-128:]}" + self.log.error("Failed to create_node", errMsg) continue instIDs.append(VM_ID_PREFIX + node.id) stampDict[instName] = instRandom