Skip to content

Change the user on failed service check (bugfix)#1894

Merged
fernando79513 merged 1 commit intomainfrom
failed_service_root
May 9, 2025
Merged

Change the user on failed service check (bugfix)#1894
fernando79513 merged 1 commit intomainfrom
failed_service_root

Conversation

@Hook25
Copy link
Copy Markdown
Collaborator

@Hook25 Hook25 commented Apr 29, 2025

WARNING: This modifies com.canonical.certification::sru-server

Description

The failed_permission check fails to collect logs on some platforms because the normal user on those platforms doesn't have the permission to read the journal on some services. There is no reason not to run this as root.

See:

Found 1 failed units

Failed units:
  UNIT                      LOAD   ACTIVE SUB    DESCRIPTION
● plymouth-show-run.service loaded failed failed Display state on splash

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.
1 loaded units listed.

Logs for plymouth-show-run.service:
Hint: You are currently not seeing messages from other users and the system.
      Users in groups 'adm', 'systemd-journal' can see all messages.
      Pass -q to turn off this notice.
No journal files were opened due to insufficient permissions.

Resolved issues

Fixes: CHECKBOX-1738

Documentation

N/A

Tests

N/A

This is needed because the logs collection needs enough permissions and
on some platforms the "normal" user doesn't have them
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.46%. Comparing base (bd47976) to head (2dfcd27).
⚠️ Report is 113 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1894   +/-   ##
=======================================
  Coverage   50.46%   50.46%           
=======================================
  Files         382      382           
  Lines       41039    41039           
  Branches     6892     6892           
=======================================
  Hits        20709    20709           
  Misses      19585    19585           
  Partials      745      745           
Flag Coverage Δ
provider-base 26.68% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@fernando79513 fernando79513 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM+1!

@fernando79513 fernando79513 merged commit b43088f into main May 9, 2025
21 of 22 checks passed
@fernando79513 fernando79513 deleted the failed_service_root branch May 9, 2025 09:42
aglinserer pushed a commit to aglinserer/checkbox that referenced this pull request May 12, 2025
Change the user on failed service check

This is needed because the logs collection needs enough permissions and
on some platforms the "normal" user doesn't have them
mreed8855 pushed a commit that referenced this pull request Jul 30, 2025
Change the user on failed service check

This is needed because the logs collection needs enough permissions and
on some platforms the "normal" user doesn't have them
mreed8855 pushed a commit that referenced this pull request Jul 31, 2025
Change the user on failed service check

This is needed because the logs collection needs enough permissions and
on some platforms the "normal" user doesn't have them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants