Bug 506600
Summary: | After F10 -> F11 upgrade, DHCP server won't start | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Răzvan Sandu <rsandu2004> |
Component: | dhcp | Assignee: | David Cantrell <dcantrell> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | low | ||
Version: | 11 | CC: | dcantrell, gilboad, marius.stracna, tom, vanmeeuwen+fedora, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 4.1.0-23.fc11 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-08-05 00:36:35 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Răzvan Sandu
2009-06-17 21:24:45 UTC
After much investigation, I've found that the default configuration file, which was /etc/dhcpd.conf, now went into /etc/dhcp/dhcpd.conf. That's OK, but it is bad practice to do such a change without a safe-belt mechanism - to move the old file at upgrade (via rpm) - and/or document this change in big bold letters, in the Release Notes ? The change *is* documented in dhcpd man page, in the FILES section, after a 3 km long text ;-) ; besides, the error message that shows up in /var/log/messages when the config file is in the old place is misleading... Regards, Răzvan That is correct, the configuration files for both dhcpd and dhclient have moved to the /etc/dhcp subdirectory. There are a lot of possible configuration files for dhcp and rather than pollute /etc directly, it felt time to move them in to a subdirectory. However, on upgrade the dhcp package will create a link named /etc/dhcp/dhcpd.conf that points to /etc/dhcpd.conf if that's where you've had the configuration file. This report is the first I've heard of such problem, but it's entirely possible there is an issue with the %post install scriptlet. Can you describe how you upgraded? Thanks, David ! There is noting unusual about my upgrade. I had a manually-created /etc/dhcpd.conf on a stock Fedora system. That's true it was freshly installed with Fedora 7 and upgraded version by version. Automatic nightly upgrades are also active. The F10 -> F11 upgrade was done via DVD, by the book. ;-) After the upgrade, I noticed that the DHCP server doesn't start (this is the main function of the machine) and I started to "dig", suspecting an inter-version syntax change in dhcpd.conf. The misleading part was the message that appeared in /var/log/messages (which I had open in another terminal while repeatedly trying to restart the dhcpd service). The message says that there is no subnet declaration in the config file - which was actually true, apparently because I was working on /etc/dhcpd.conf and the service was reading /etc/dhcp/dhcpd.conf, which was empty (contained some comments only...) After some time, I discovered the truth - when I've tried to move the configuration file on another physical machine, using FileZilla. Thanks again, Răzvan I can confirm it. My original F10's /etc/dhcpd.conf got deleted somehow and replaced with an empty /etc/dhcpd.conf. On the other hand, the service was reading a second file (/etc/dhcp/dhcpd.conf) that was also empty... Only once I created a new /etc/dhcp/dhcpd.conf file, dhcpd started working again. - Gilboa IMHO, the rpm package should follow this "algorithm" - in case of upgrade: 1. check if there is a pre-existent /etc/dhcpd.conf on disk 2. if there is one, move it to /etc/dhcp/dhcpd.conf (as it is); else create an empty /etc/dhcp/dhcpd.conf (containing only comments) 3. in both cases, create /etc/dhcpd.conf as a symlink to /etc/dhcp/dhcpd.conf Best regards, Răzvan This I believe is the scriptlet used for dhcp-4.1.0-20.fc11.x86_64 == if [ -f /etc/dhcpd.conf ] && [ ! -r /etc/dhcp/dhcpd.conf ]; then /bin/ln -s /etc/dhcpd.conf /etc/dhcp/dhcpd.conf >/dev/null 2>&1 fi == This says; If /etc/dhcpd.conf exists and I can't read /etc/dhcp/dhcpd.conf, then create that symbolic link. So, maybe, if dhcpd does not read this symlink really well or something like that, this should say; If /etc/dhcpd.conf exists and I can't read /etc/dhcp/dhcpd.conf, then move /etc/dhcpd.conf to /etc/dhcp/dhcpd.conf and create /etc/dhcpd.conf -> /etc/dhcp/dhcpd.conf David, what do you think? I don't really like the idea of the RPM scriptlet moving the configuration file to /etc/dhcp. I prefer to leave it as /etc/dhcpd.conf and create a symlink as /etc/dhcp/dhcpd.conf. Mostly because that gives users a path to downgrade to a previous package if they need to. In cases of new installations where users create /etc/dhcpd.conf rather than /etc/dhcp/dhcpd.conf, how about the dhcpd init script failing and logging a message and/or displaying a message on the console explaining the config file should go in /etc/dhcp? The idea with the symlink is simply to preserve the existing location of a configuration file. I don't want to honor both /etc/dhcpd.conf and /etc/dhcp/dhcpd.conf. In fact, when /etc/dhcp/dhcpd.conf is a symlink pointing /etc/dhcpd.conf, perhaps the init script should also log a deprecation warning telling users that /etc/dhcp/dhcpd.conf is the location of the configuration file. The dhcpd executable looks for /etc/dhcp/dhcpd.conf now, it does not look at /etc/dhcpd.conf. Thoughts? Same problem here. My old dhcpd.conf got renamed to /etc/dhcpd.conf.rpmsave and a fresh new (and useless) dhcpd.conf placed into /etc/dhcp - so I was going around in circles after I put the rpmsave file back in the usual place, not realizing that the short and useless file in the new location was what was in charge. I'm not quite sure what should be done, but moving my existing dhcpd.conf file to the new location would certainly have kept things working. I wonder if this is documented in the FC11 release notes? The %post script in the dhcp package needed some work. I made some assumptions and also shell scripting is programmer hostile. I've got it working now for initial installs where you already have /etc/dhcpd.conf but no dhcp package installed as well as upgrades from previous versions. The %post script will now copy /etc/dhcpd.conf in to /etc/dhcp/dhcpd.conf. The old one remains and if you are upgrading, rpm will rename it to dhcpd.conf.rpmsave. But with it copied over to /etc/dhcp, the server will continue working. I am currently building the update in to rawhide and F-11. Sorry for all the problems with this issue and thanks, everyone, for the reports. dhcp-4.1.0-23.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/dhcp-4.1.0-23.fc11 dhcp-4.1.0-23.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update dhcp'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7546 dhcp-4.1.0-23.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. |