From 7860fc953991983795fba6440364a255cab8dc18 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 30 Jun 2020 11:21:00 +0200 Subject: Codesign: Wait for unsigned directory to appear Solves problem with different order of codesign server startup and mount of network shares: avoids exception happening when server is started prior to the mounts are ready. --- build_files/buildbot/codesign/base_code_signer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build_files/buildbot/codesign/base_code_signer.py b/build_files/buildbot/codesign/base_code_signer.py index 079f7aef54c..dca771cdbaf 100644 --- a/build_files/buildbot/codesign/base_code_signer.py +++ b/build_files/buildbot/codesign/base_code_signer.py @@ -337,6 +337,11 @@ class BaseCodeSigner(metaclass=abc.ABCMeta): # TOOD(sergey): Support graceful shutdown on Ctrl-C. + logger_server.info( + f'Waiting for a request directory {self.unsigned_storage_dir} to appear.') + while not self.unsigned_storage_dir.exists(): + time.sleep(1) + logger_server.info( 'Waiting for a READY indicator of any signing request.') request_id = None -- cgit v1.2.3