Skip to content

split fpm config to two parts #903

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

Closed
wants to merge 1 commit into from

Conversation

glensc
Copy link
Contributor

@glensc glensc commented Nov 18, 2014

main config = global options
secondary config = pool options

makes easier to add new pools:
duplicate pool config in fpm.d dir

https://bugs.php.net/bug.php?id=67106

as i understand from bug report comments, currently "lowest version" is master, so this PR is against master branch

@glensc glensc force-pushed the bug-67106-fpm-conf-split branch from e1ff42f to 46ff199 Compare November 18, 2014 21:20
@remicollet
Copy link
Member

This is already used in some downstream distribution (like Fedora / RHEL / CentOS)
I will prefer /etc/php-fpm.d
And at least a new unit test should be added (lot of have be recently added because lack of covereage for this SAPI)

@glensc
Copy link
Contributor Author

glensc commented Nov 20, 2014

the path can be made configurable with @fpm_conf_d_dir@ or similar, it's not a problem. thanks for taking interest!

@glensc
Copy link
Contributor Author

glensc commented Nov 20, 2014

but what kind of test would you expect from config split? tests don't use installed configs, but their own.

@glensc
Copy link
Contributor Author

glensc commented Nov 20, 2014

looks like it can be set like:

./php-fpm.conf.in:125:include=@php_fpm_sysconfdir@/php-fpm.d/*.conf

that should expand to: /etc/php-fpm.d on your system. is that ok @remicollet?

@remicollet
Copy link
Member

that should expand to: /etc/php-fpm.d on your system. is that ok @remicollet?

IMHO opinion, yes (but I'm not the only one which can say something)

but what kind of test would you expect from config split? tests don't use installed configs, but their own.

Forget, I already add a test for splitted configuration (to check load order after PR 906 , bug 68391)

@smalyshev
Copy link
Contributor

Needs rebase

@glensc
Copy link
Contributor Author

glensc commented Nov 26, 2014

@smalyshev of course it does, this patch is against master branch!

do you approve this change and intend to merge? because rebasing such PR each time someone makes a change is very annoying, because i would need to manually redo whole file splitting again.

i would rebase it just before final merge.

@glensc glensc force-pushed the bug-67106-fpm-conf-split branch from 9762eb6 to 9bed4ba Compare November 26, 2014 05:25
@smalyshev
Copy link
Contributor

@glensc I'm fine with it but I'd like one of FPM maintainers to sign off also, since I don't know enough FPM.

@glensc
Copy link
Contributor Author

glensc commented Dec 12, 2014

@smalyshev can you ping them?

@remicollet
Copy link
Member

Please rebase, I think there is no other configuration change pending.

@glensc glensc force-pushed the bug-67106-fpm-conf-split branch from 9bed4ba to 4357e32 Compare December 13, 2014 13:33
@glensc
Copy link
Contributor Author

glensc commented Dec 13, 2014

rebased once again.

@remicollet
Copy link
Member

Patch looks fine, and works.

2 minor cosmetic hanges

  • please rename php-fpm.conf-d.in (ugly name imho) to www.conf.in
  • as you add the "glob / include" at the end (under pool definition), I think it will make sense to drop it from the beginning of php-fpm.conf.in, to keep only one (and only 1 include is currently allowed, see 68022)

@remicollet
Copy link
Member

Good catch in 4357e32
But this one have to go in 5.6
But this will mean another rebase... sorry...

@remicollet
Copy link
Member

@glensc
Copy link
Contributor Author

glensc commented Dec 14, 2014

aside, current the configs are installed with .default extension, and none installed at all with base extension, meaning by default there's no working config, end user has to rename two files

so, imho
(in another pr after this gets merged), should copy foo.conf.default to foo.conf if foo.conf does not exist. or make the config install more rpm-like: install foo.conf if no such exist, otherwise use foo.conf.default

main config = global options
secondary config = pool options

makes easier to add new pools:
duplicate pool config in fpm.d dir

https://bugs.php.net/bug.php?id=67106
@glensc
Copy link
Contributor Author

glensc commented Dec 14, 2014

i had the "include" directive once in first version patch (moved to the bottom), but with the flood of rebases, seems it got lost or i thought differently.

@glensc glensc force-pushed the bug-67106-fpm-conf-split branch from c487573 to 436dd9e Compare December 14, 2014 10:57
@glensc
Copy link
Contributor Author

glensc commented Dec 14, 2014

rebased again

@php-pulls
Copy link

Comment on behalf of remi at php.net:

merged

@php-pulls php-pulls closed this Dec 14, 2014
@glensc
Copy link
Contributor Author

glensc commented Dec 15, 2014

wohoo!

glensc added a commit to pld-linux/php that referenced this pull request Jul 10, 2017
glensc added a commit to pld-linux/php that referenced this pull request Jul 10, 2017
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