[autobackport: sssd-2-9] SSSCTL: config-check: do not return an error if snippets directory does not exists#8310
Conversation
There was a problem hiding this comment.
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.
|
I will take care of fixing the conflicts here. |
66a452a to
0d40612
Compare
|
@aplopez Please review for approval, conflicts were related to tests and trivial. |
…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)
|
The pull request was accepted by @aplopez with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
0d40612 to
ff15133
Compare
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
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
Conflicting Files Information (check for deleted and re-added files)
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.