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

docs: describe caveat and workaround for multiple fpm pools #366

Merged
merged 2 commits into from
Nov 10, 2024

Conversation

igolman
Copy link
Contributor

@igolman igolman commented Nov 7, 2024

Description

Added documentation on handling multiple php-fpm service restarts when provisioning multiple FPM pools. This serves as an addendum to PR 365 and a RFC at once.

While the change in PR 365 was not entirely incorrect (default :delayed notification :timer was explicitly set), it did not address the issue at all.

After investigating the problem further and testing a working solution, I’d like to share my findings.

Since chef-client v18,unified_mode true is the default setting for custom resources.

With unified_mode true enabled:

  • Single-phase Execution: Properties and actions are unified, meaning that everything inside the resource (properties, actions, notifications) is evaluated in one continuous phase.
  • End-of-Action Notifications: Notifications set as :delayed within a custom resource action (like action :install) are queued to be processed once the action completes, rather than waiting until the end of the Chef client run.

This means that my previous assertion in PR 365 was incorrect. Although the service resource notification was indeed set to :delayed, due to unified_mode true it was triggered at the end of the action :install block within the fpm_pool resource, not at the end of the chef-client run.

Documentation has been added; feedback is welcome.

Issues Resolved

Caveat and possible Workaround for managing multiple FPM pools documented.

Check List

  • [-] A summary of changes made is included in the CHANGELOG under ## Unreleased
  • [-] New functionality includes testing.
  • [-] New functionality has been documented in the README if applicable.

@igolman igolman requested a review from a team as a code owner November 7, 2024 18:29
@ramereth ramereth added Release: Patch Release to Chef Supermarket as a version patch when merged Skip: Announcements On Release this will not put a message in the #Announcements slack channel labels Nov 10, 2024
@ramereth ramereth merged commit 644a259 into sous-chefs:main Nov 10, 2024
43 of 44 checks passed
@kitchen-porter
Copy link
Contributor

Released as: 10.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release: Patch Release to Chef Supermarket as a version patch when merged Skip: Announcements On Release this will not put a message in the #Announcements slack channel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants