Skip to content

Commit

Permalink
Merge pull request #249 from xcp-ng/systemd_failed_units
Browse files Browse the repository at this point in the history
Print the full error message for failed systemd units
  • Loading branch information
stormi authored Aug 14, 2024
2 parents 0e6c43d + a649c69 commit d7ebe7c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/system/test_systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
def test_failed_units(host):
failed_services = host.ssh(['systemctl', '--state=failed', '--full', '--all',
'--no-pager', '--no-legend'])
for unit in failed_services.splitlines():
logging.error(f"Unit {unit.split()[0]} failed")

assert not failed_services
if failed_services:
pytest.fail(failed_services)

white_list_issues = [
"Cannot add dependency job for unit [email protected], ignoring: Unit is masked.",
"Cannot add dependency job for unit display-manager.service, ignoring: Unit not found.",
"Cannot add dependency job for unit qemuback.service, ignoring: Unit not found.",
"Cannot add dependency job for unit sr_health_check.timer, ignoring: Unit not found.",
]

pytest.fixture(scope='module')
Expand Down

0 comments on commit d7ebe7c

Please sign in to comment.