Bug 1320301

Summary: RFE: Add script for updating config from DHCP (dhclient) data
Product: [Fedora] Fedora Reporter: Ville Skyttä <ville.skytta>
Component: nginxAssignee: Felix Kaechele <felix>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: athmanem, bperkins, code, felix, jeremy, jkaluza, pavel.lisy, peter.borsa, wtogami
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 01:40:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
nginx dhclient-script
none
nginx dhclient-script none

Description Ville Skyttä 2016-03-22 19:22:38 UTC
Created attachment 1139196 [details]
nginx dhclient-script

Attached is a script that generates resolver configs for nginx from DHCP data received by dhclient(-script). One example problem case that this solves on setups using dhclient: http://thread.gmane.org/gmane.comp.web.nginx.english/46277

Even though this does work out of the box (tested on CentOS 7 with nginx upstream rpms), the safe bet would be to just include it as %doc in the nginx package, at least for now. Let me know if you'd like me to do that and push a new rawhide build.

Comment 1 Ville Skyttä 2016-03-22 19:33:05 UTC
Created attachment 1139197 [details]
nginx dhclient-script

Ah, this stuff works also with nm-dispatcher due to its dhclient-script emulation. And it seems to care about the script exit status; this version avoids that noise on setups where nginx is installed but not running.

Comment 2 Jamie Nguyen 2016-06-05 15:39:01 UTC
Hi Ville. Thanks for this but I don't think this really belongs in the nginx package, sorry.

Comment 3 Ville Skyttä 2016-06-06 05:53:35 UTC
Why? Do you think it belongs somewhere else? Please elaborate.

Comment 4 Daniel 2017-04-23 23:18:42 UTC
Ville Skyttä, this belongs upstream if anywhere.

Comment 5 Felix Kaechele 2021-04-21 01:40:05 UTC
I looked into it and no longer deem this good practice.
For an explanation see http://blog.zorinaq.com/nginx-resolver-vulns/