diff --git a/src/DIRAC/Resources/Computing/CloudComputingElement.py b/src/DIRAC/Resources/Computing/CloudComputingElement.py index 8b1c1d26051..5d357a5d5c6 100644 --- a/src/DIRAC/Resources/Computing/CloudComputingElement.py +++ b/src/DIRAC/Resources/Computing/CloudComputingElement.py @@ -404,7 +404,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