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

Solve KCM failure on system tests on F40 #69

Merged
merged 3 commits into from
Jan 16, 2024
Merged

Conversation

aplopez
Copy link
Contributor

@aplopez aplopez commented Jan 11, 2024

Sudo tests are failing as a result of KCM not being started. systemd refuses to start KCM because some tests are starting and stopping KCM too quickly and systemd considers this is a failure.

To avoid this behavior, pytest-mh now resets the failed flag every time a unit is started. Because this behavior was changed specifically for this fix, we need to get next-actions/pytest-mh#34 pulled before pulling this one.

in addition, we made the handling of KCM coherent through the start(), stop(), restart() and their asynchronous versions. So far only start() would stop KCM for it to re-read its configuration.

Because of the changes in pytest-mh, disabling the bust limit is no longer necessary and was removed.

@pbrezina
Copy link
Member

Thank you. We disable burst limit for sssd at https://github.com/SSSD/sssd-test-framework/blob/master/sssd_test_framework/hosts/client.py#L74 so the same can be done for KCM, but this looks like a better approach. Can you remove the burst limit configuration?

I think we can move reset_failed directly to pytest-mh, e.g. call systemctl reset-failed unit && systemctl start .... Since if you start it manually, you probably always wants it to work and don't think about this, right?

It should only be needed for start and restart, not stop.

@aplopez
Copy link
Contributor Author

aplopez commented Jan 12, 2024

We disable burst limit for sssd at https://github.com/SSSD/sssd-test-framework/blob/master/sssd_test_framework/hosts/client.py#L74 so the same can be done for KCM, but this looks like a better approach. Can you remove the burst limit configuration?

Done.

I think we can move reset_failed directly to pytest-mh, e.g. call systemctl reset-failed unit && systemctl start .... Since if you start it manually, you probably always wants it to work and don't think about this, right?

It should only be needed for start and restart, not stop.

Done too.

pbrezina
pbrezina previously approved these changes Jan 15, 2024
@pbrezina
Copy link
Member

Thanks. I added commit to bump pytest-mh minimum version.

aplopez and others added 3 commits January 16, 2024 13:17
When SSSD was synchronously started, the KCM service was stopped. When
used, KCM would be started by the socket unit, allowing it to re-read
the configuration.

This behavior was not coherent across start(), stop(), async_start(),
async_stop(), restart() and async_restart().

This commits makes the behavior coherent across these methods.
Now that pytest-mh:SystemdServices is reseting the failed flag,
this is no longer needed.
@pbrezina pbrezina merged commit 6b780cb into SSSD:master Jan 16, 2024
1 of 2 checks passed
@aplopez aplopez deleted the kcm-test branch January 16, 2024 12:25
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