Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 446631 - NetworkManager does not run dhclient-exit-hooks script
NetworkManager does not run dhclient-exit-hooks script
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
9
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-15 10:05 EDT by Tom Horsley
Modified: 2014-06-09 07:16 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-14 11:14:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom Horsley 2008-05-15 10:05:51 EDT
Description of problem:

The traditional way to provide information which cannot be provided by
DHCP (specifically in my case additional DNS domain names in search path)
has been by writing an /etc/dhclient-exit-hooks script which can be used
to edit the /etc/resolv.conf file after it is created by DHCP. This script
is no longer being run when NetworkManager creates resolv.conf

Version-Release number of selected component (if applicable):

NetworkManager-0.7.0-0.9.3.svn3623.fc9.x86_64

How reproducible:

Every time I boot.

Steps to Reproduce:
1. Boot system, observe NetworkManager generated resolv.conf does not
   have the changed dhclient-exit-hooks would have made.
  
Actual results:

see above

Expected results:

augmented search path in resolv.conf

Additional info:

I'd be happy to learn the "new way" to achieve the same thing
dhclient-exit-hooks did, but on the other hand, I'd really wonder
why there would need to be a "new way" other than obsessive OCD
on the part of developers. How hard is it to just run the dadgum
script if it exists?
Comment 1 Todd J Martin 2008-05-18 18:51:47 EDT
NetworkManager provides its own hooks into dhclient so that it can do its thing.
 You can get NetworkManager to call your script though.  NetworkManager runs all
scripts that are in /etc/NetworkManager/dispatcher.d.  There should be at least
one script in there to show you how things work. 
Comment 2 Mike Loseke 2008-07-10 14:51:02 EDT
Scripts in /etc/NetworkManager/dispatcher.d/ do work, but they don't fully
handle the sorts of things the dhclient-script and friends did.  It's certainly
less featureful.

For example, when dhclient does a renew, NetworkManager does not run any script
in /etc/NetworkManager/dispatcher.d/.  Those only seem to be run when
NetworkManager changes state on a device using either "up" or "down". 
NetworkManager's actions after the renew causes some other services to have to
rediscover the interface:

Jul 10 01:48:22 laptop dhclient: DHCPREQUEST on wlan0 to 192.168.1.1 port 67
Jul 10 01:48:22 laptop dhclient: DHCPACK from 192.168.1.1
Jul 10 01:48:22 laptop dhclient: bound to 192.168.1.6 -- renewal in 42559 seconds.
Jul 10 01:48:22 laptop NetworkManager: <info>  DHCP: device wlan0 state changed
bound -> renew
Jul 10 01:48:22 laptop NetworkManager: <info>    address 192.168.1.6
Jul 10 01:48:22 laptop NetworkManager: <info>    netmask 255.255.255.0
Jul 10 01:48:22 laptop NetworkManager: <info>    gateway 192.168.1.1
Jul 10 01:48:22 laptop NetworkManager: <info>    nameserver '127.0.0.1'
Jul 10 01:48:22 laptop avahi-daemon[2579]: Withdrawing address record for
192.168.1.6 on wlan0.
Jul 10 01:48:22 laptop avahi-daemon[2579]: Leaving mDNS multicast group on
interface wlan0.IPv4 with address 192.168.1.6.
Jul 10 01:48:22 laptop avahi-daemon[2579]: Interface wlan0.IPv4 no longer
relevant for mDNS.
Jul 10 01:48:22 laptop avahi-daemon[2579]: Joining mDNS multicast group on
interface wlan0.IPv4 with address 192.168.1.6.
Jul 10 01:48:22 laptop avahi-daemon[2579]: New relevant interface wlan0.IPv4 for
mDNS.
Jul 10 01:48:22 laptop avahi-daemon[2579]: Registering new address record for
192.168.1.6 on wlan0.IPv4.
Jul 10 01:48:23 laptop NetworkManager: <info>  Policy set (wlan0) as default
device for routing and DNS.

I run openvpn as a service, outside of NetworkManager.  Using the normal
dhclient-script hooks, I can detect this action and restart the openvpn service
when it happens.  The /usr/libexec/nm-dhcp-client.action script NetworkManager
runs from dhclient doesn't appear to be able to handle the same idea of hooks. 
Without a cronjob watching things, or modifying NetworkManager's init script to
use the normal dhclient-script, I have to manually restart openvpn everytime
DHCP renews.  It tends to be less than transparent.

Should this replacement for dhclient-script read and handle the same hooks files
that dhclient-script itself uses, or should NetworkManager itself not make
changes to an interface like this when a simple renew happens?  Ideally,
functionality replaced should not be a reduction.  I'd like to see the hooks work.
Comment 3 Niels Haase 2009-04-08 16:11:44 EDT
Reporter, are you still running Fedora 9, or have you upgraded to Fedora 10 or
Rawhide? In either case, can you let us know whether the issue is still happening, and give the current version of the kernel and NM packages you're
using. Thank you.


-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 4 Bug Zapper 2009-06-09 20:51:34 EDT
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 5 Bug Zapper 2009-07-14 11:14:13 EDT
Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 6 Tom Horsley 2014-06-09 07:16:11 EDT
Nothing like stoopid automation.

Note You need to log in before you can comment on or make changes to this bug.