Skip to content

Commit 65f75c5

Browse files
committed
Log preload startup failure reason
1 parent 7f7b49a commit 65f75c5

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

qubes/vm/dispvm.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,7 @@ async def wait_operational_preload(
506506
await asyncio.wait_for(
507507
self.run_service_for_stdio(
508508
service,
509-
stdout=subprocess.DEVNULL,
510-
stderr=subprocess.DEVNULL,
509+
stderr=subprocess.STDOUT,
511510
),
512511
timeout=timeout,
513512
)
@@ -519,12 +518,13 @@ async def wait_operational_preload(
519518
"startup. To debug, run the following on a new disposable of "
520519
"'%s': %s" % (service, timeout, self.template, debug_msg)
521520
)
522-
except (subprocess.CalledProcessError, qubes.exc.QubesException):
523-
debug_msg = "systemctl --failed"
521+
except subprocess.CalledProcessError as e:
524522
raise qubes.exc.QubesException(
525-
"Error on call to '%s' during preload startup. To debug, "
526-
"disable preloading from '%s' and run the following on a new "
527-
"disposable: %s" % (service, self.template, debug_msg)
523+
"Error on call to '%s' during preload startup: %s"
524+
% (
525+
service,
526+
qubes.utils.sanitize_stderr_for_log(e.stdout),
527+
)
528528
)
529529

530530
@qubes.events.handler("domain-start")

0 commit comments

Comments
 (0)