Skip to content

[autobackport: sssd-2-9] SSSCTL: config-check: do not return an error if snippets directory does not exists#8310

Merged
justin-stephenson merged 2 commits intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr7962-to-sssd-2-9
Dec 19, 2025
Merged

[autobackport: sssd-2-9] SSSCTL: config-check: do not return an error if snippets directory does not exists#8310
justin-stephenson merged 2 commits intoSSSD:sssd-2-9from
sssd-bot:SSSD-sssd-backport-pr7962-to-sssd-2-9

Conversation

@sssd-bot
Copy link
Contributor

This is an automatic backport of PR#7962 SSSCTL: config-check: do not return an error if snippets directory does not exists to branch sssd-2-9, created by @scabrero.

Caution

@scabrero The patches did not apply cleanly. It is necessary to resolve conflicts before merging this pull request. Commits that introduced conflict are marked with CONFLICT!.

You can push changes to this pull request

git remote add sssd-bot git@github.com:sssd-bot/sssd.git
git fetch sssd-bot refs/heads/SSSD-sssd-backport-pr7962-to-sssd-2-9
git checkout SSSD-sssd-backport-pr7962-to-sssd-2-9
git push sssd-bot SSSD-sssd-backport-pr7962-to-sssd-2-9 --force

Original commits
698f992 - SSSCTL: config-check: do not return an error if snippets directory does not exists
be84217 - tests: Update sssctl config-check tests

Backported commits

  • 5860231 - SSSCTL: config-check: do not return an error if snippets directory does not exists
  • 3c7b8f6 - CONFLICT! tests: Update sssctl config-check tests

Conflicting Files Information (check for deleted and re-added files)

  • CONFLICT! tests: Update sssctl config-check tests
On branch SSSD-sssd-backport-pr7962-to-sssd-2-9
You are currently cherry-picking commit be8421707.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/tests/system/tests/test_sssctl.py

no changes added to commit (use "git add" and/or "git commit -a")

Original Pull Request Body

There is a discrepancy between sssd and sssctl config-check regarding the absence of the snippets directory.

The sssctl config-check command exits with code 1, but sssd does not consider it a hard error, it just logs a warning and then runs fine.

When there is a real error parsing the snippets, the ra_error array contains at least two elements.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request aims to align sssctl config-check behavior with sssd by not erroring on a missing snippets directory. While the intent is good, the C code change introduces a critical bug where other configuration errors are ignored if the snippets directory is missing. Additionally, the Python test file src/tests/system/tests/test_sssctl.py contains several merge conflicts that must be resolved. My review provides a fix for the bug and guidance on resolving the test conflicts.

@justin-stephenson
Copy link
Contributor

I will take care of fixing the conflicts here.

@justin-stephenson justin-stephenson force-pushed the SSSD-sssd-backport-pr7962-to-sssd-2-9 branch 3 times, most recently from 66a452a to 0d40612 Compare December 18, 2025 20:55
@justin-stephenson justin-stephenson marked this pull request as ready for review December 19, 2025 12:52
@justin-stephenson
Copy link
Contributor

@aplopez Please review for approval, conflicts were related to tests and trivial.

Copy link
Contributor

@aplopez aplopez left a comment

Choose a reason for hiding this comment

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

LGTM

scabrero and others added 2 commits December 19, 2025 13:10
…es not exists

There is a discrepancy between sssd and sssctl config-check regarding
the absence of the snippets directory.

The sssctl config-check command exits with code 1, but sssd does not
consider it a hard error, it just logs a warning and then runs fine.

Signed-off-by: Samuel Cabrero <scabrero@suse.com>
Reviewed-by: Alejandro López <allopez@redhat.com>
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
(cherry picked from commit 698f992)
Tests using non-default config specified a full path, which
--config argument does not handle. The --snippet argument needs
to be provided because it defaults to conf.d if not specified.

Reviewed-by: Alejandro López <allopez@redhat.com>
Reviewed-by: Justin Stephenson <jstephen@redhat.com>
(cherry picked from commit be84217)
@sssd-bot
Copy link
Contributor Author

The pull request was accepted by @aplopez with the following PR CI status:


🟢 CodeQL (success)
🟢 rpm-build:centos-stream-9-x86_64:upstream (success)
🟢 Build / make-distcheck (success)
🟢 ci / prepare (success)
🟢 ci / system (centos-9) (success)
🟢 Static code analysis / codeql (success)
🟢 Static code analysis / pre-commit (success)
🟢 Static code analysis / python-system-tests (success)


There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging.

@sssd-bot sssd-bot force-pushed the SSSD-sssd-backport-pr7962-to-sssd-2-9 branch from 0d40612 to ff15133 Compare December 19, 2025 13:11
@justin-stephenson justin-stephenson merged commit 7f46f04 into SSSD:sssd-2-9 Dec 19, 2025
9 checks passed
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.

4 participants