Skip to content

Commit

Permalink
Merge pull request #7829 from DIRACGridBot/cherry-pick-2-ed96c787e-in…
Browse files Browse the repository at this point in the history
…tegration

[sweep:integration] CloudCE: truncate long messages returned from create_node
  • Loading branch information
fstagni authored Oct 17, 2024
2 parents 196aba7 + 6a22662 commit b5bc25c
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 @@ -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
Expand Down

0 comments on commit b5bc25c

Please sign in to comment.