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

sudo improvements #5610

Closed
wants to merge 5 commits into from
Closed

sudo improvements #5610

wants to merge 5 commits into from

Conversation

@pbrezina
Copy link
Member Author

The tests fails because ldap_sudo_random_offset default to 30 instead of 0. I wonder if I should update the tests or change the default value to 0?

@pbrezina
Copy link
Member Author

pbrezina commented Apr 30, 2021

@sgoveas Hi, this adds new option ldap_sudo_random_offset that defaults to 30 seconds. This will make some sudo tests fail (those that test smart and full refresh at the very least). I didn't find relevant multihost test so I assume sudo is still tested by bash tests and those needs to be amended with ldap_sudo_random_offset = 0.

@thalman thalman self-assigned this May 4, 2021
@pbrezina pbrezina force-pushed the sudo-man branch 2 times, most recently from 9173976 to 44c5de5 Compare May 5, 2021 12:03
@thalman
Copy link
Contributor

thalman commented May 7, 2021

The code looks good, works for me. I have just one comment: You titled one commit "be: add be_ptask_reschedule" but the function added is called *_postpone. Could you make that consistent for future search/reference?

Tom

This will cancel the next event and schedule it to now + period.
We postpone periodic full and smart refresh tasks when full refresh
(either per-request or periodic) is finished.

Resolves: SSSD#5604

:feature: Completing a sudo full refresh now postpones the smart refresh
  by `ldap_sudo_smart_refresh_interval` value. This ensure that the smart
  refresh is not run too soon after a successful full refresh.
Resolves: SSSD#5609

:feature: Backround sudo periodic tasks (smart and full refresh) periods
  are now extended by a random offset to spread the load on the server in
  environments with many clients. The random offset can be changed with
  `ldap_sudo_random_offset`.

:config: Added `ldap_sudo_random_offset` (default to `30`) to add a
  random offset to backround sudo periodic tasks (smart and full
  refresh).
@pbrezina
Copy link
Member Author

pbrezina commented May 7, 2021

Done

@thalman
Copy link
Contributor

thalman commented May 7, 2021

Thank you for the update,
ACK

@pbrezina pbrezina added the Ready to push Ready to push label May 7, 2021
@pbrezina
Copy link
Member Author

pbrezina commented May 7, 2021

Pushed PR: #5610

  • master
    • ca47acc - sudo: add ldap_sudo_random_offset
    • d9d5c29 - sudo: reschedule periodic tasks when full refresh is finished
    • c0204c0 - be: add be_ptask_postpone
    • b3247ee - man: document how to tune sudo performance
    • 61a03b2 - man: document how to disable sudo smart and full refresh

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.

2 participants