Files
zuul/zuul/launcher
Simon Westphahl a846b257c9 Ignore lock errors when resetting image uploads
When attempting to reset lost uploads multiple launchers could race
trying to update the same upload. In addition this could also happen
when the cache is not fully up-to-date.

Instead of causing an error in the main thread, we can catch and ignore
the exception in case we did not get the lock.

ERROR zuul.Launcher: Error in main thread:
Traceback (most recent call last):
  File "/opt/zuul/lib/python3.11/site-packages/zuul/launcher/server.py", line 955, in run
    self._run()
  File "/opt/zuul/lib/python3.11/site-packages/zuul/launcher/server.py", line 972, in _run
    self.checkMissingUploads()
  File "/opt/zuul/lib/python3.11/site-packages/zuul/launcher/server.py", line 1967, in checkMissingUploads
    with (upload.locked(ctx, blocking=False),
  File "/usr/local/lib/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/opt/zuul/lib/python3.11/site-packages/zuul/zk/zkobject.py", line 575, in locked
    raise LockException(f"Failed to acquire lock on {self}")
zuul.zk.exceptions.LockException: Failed to acquire lock on ...

Change-Id: Ibdd75db1aa52be0da2beed681b597b73c9a205bb
2025-05-12 13:28:48 +02:00
..