Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-1086) fix: do not check/verify slice units if recursive errors are to be ig… #235

Merged

Conversation

mrc0mmand
Copy link
Member

@mrc0mmand mrc0mmand commented Feb 19, 2024

…nored

Before this fix, when recursive-errors was set to 'no' during a systemd-analyze
verification, the parent slice was checked regardless. The 'no' setting means that,
only the specified unit should be looked at and verified and errors in the slices should be
ignored. This commit fixes that issue.

Example:

Say we have a sample.service file:

[Unit]
Description=Sample Service

[Service]
ExecStart=/bin/echo "a"
Slice=support.slice

Before Change:

systemd-analyze verify --recursive-errors=no maanya/sample.service
Assertion 'u' failed at src/core/unit.c:153, function unit_has_name(). Aborting.
Aborted (core dumped)

After Change:

systemd-analyze verify --recursive-errors=no maanya/sample.service
{No errors}

(cherry picked from commit f660c7f)

Related: RHEL-1086

…nored

Before this fix, when recursive-errors was set to 'no' during a systemd-analyze
verification, the parent slice was checked regardless. The 'no' setting means that,
only the specified unit should be looked at and verified and errors in the slices should be
ignored. This commit fixes that issue.

Example:

Say we have a sample.service file:

[Unit]
Description=Sample Service

[Service]
ExecStart=/bin/echo "a"
Slice=support.slice

Before Change:

systemd-analyze verify --recursive-errors=no maanya/sample.service
Assertion 'u' failed at src/core/unit.c:153, function unit_has_name(). Aborting.
Aborted (core dumped)

After Change:
systemd-analyze verify --recursive-errors=no maanya/sample.service
{No errors}

(cherry picked from commit f660c7f)

Related: RHEL-1086
@github-actions github-actions bot changed the title fix: do not check/verify slice units if recursive errors are to be ig… (RHEL-1086) fix: do not check/verify slice units if recursive errors are to be ig… Feb 19, 2024
@github-actions github-actions bot added pr/needs-ci Formerly needs-ci pr/needs-review Formerly needs-review labels Feb 19, 2024
Copy link

github-actions bot commented Feb 19, 2024

Commit validation

Tracker - RHEL-1086

The following commits meet all requirements

commit upstream
86e43ed - fix: do not check/verify slice units if recursive errors are to be ign… systemd/systemd@f660c7f

Tracker validation

Success

🟢 Tracker RHEL-1086 has set desired product: rhel-9.4.0
🟢 Tracker RHEL-1086 has set desired component: systemd
🟢 Tracker RHEL-1086 has been approved


Pull Request validation

Success

🟢 CI - All checks have passed
🟢 Review - Reviewed by a member
🟢 Approval - Changes were approved


Auto Merge

Success

🟢 Pull Request is not marked as draft and it's not blocked by dont-merge label
🟢 Pull Request meet requirements, title has correct form
🟢 Pull Request meet requirements, mergeable is true
🟢 Pull Request meet requirements, mergeable_state is clean
🟢 Pull Request has correct target branch main
🟢 Pull Request was merged

@github-actions github-actions bot removed the pr/needs-ci Formerly needs-ci label Feb 19, 2024
@jamacku jamacku added this to the RHEL-9.4.0 milestone Feb 19, 2024
Copy link
Member

@msekletar msekletar left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot removed the pr/needs-review Formerly needs-review label Feb 20, 2024
@github-actions github-actions bot merged commit 529df7a into redhat-plumbers:main Feb 20, 2024
29 checks passed
@mrc0mmand mrc0mmand deleted the fix-analyze-verify-crash branch February 20, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants