Skip to content

Commit

Permalink
Merge pull request #1886 from ogayot/probert-double-os-prober
Browse files Browse the repository at this point in the history
filesystem: double probert timeout when running os-prober
  • Loading branch information
ogayot authored Jan 18, 2024
2 parents 753ce9f + 3d914e9 commit eae97db
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion subiquity/server/controllers/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,11 @@ async def _probe(self, *, context=None):
(False, ErrorReportKind.BLOCK_PROBE_FAIL, "block"),
(True, ErrorReportKind.DISK_PROBE_FAIL, "disk"),
]:
probert_timeout = 90.0
if self.app.opts.use_os_prober:
# We know that os-prober is going to be (very) slow on some
# systems, let's give probert more time.
probert_timeout *= 2
try:
start = time.time()
await self._probe_once_task.start(
Expand All @@ -1279,7 +1284,7 @@ async def _probe(self, *, context=None):
# We wait on the task directly here, not
# self._probe_once_task.wait as if _probe_once_task
# gets cancelled, we should be cancelled too.
await asyncio.wait_for(self._probe_once_task.task, 90.0)
await asyncio.wait_for(self._probe_once_task.task, probert_timeout)
except asyncio.CancelledError:
# asyncio.CancelledError is a subclass of Exception in
# Python 3.6 (sadface)
Expand Down

0 comments on commit eae97db

Please sign in to comment.