Skip to content

Commit

Permalink
Merge pull request #7822 from sfayer/fix_clouderrmsg
Browse files Browse the repository at this point in the history
[8.0] CloudCE: truncate long messages returned from create_node
  • Loading branch information
chrisburr authored Oct 11, 2024
2 parents b3cee1a + 7f1eb61 commit ed96c78
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/DIRAC/Resources/Computing/CloudComputingElement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed96c78

Please sign in to comment.