Bug 5405 - No /var/lib/dhcp/dhcpd.leases file when dhcpd first run
No /var/lib/dhcp/dhcpd.leases file when dhcpd first run
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: dhcp (Show other bugs)
7.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Elliot Lee
:
: 21265 38768 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-09-27 16:11 EDT by Randy Russell
Modified: 2008-05-01 11:37 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-16 09:33:05 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 Randy Russell 1999-09-27 16:11:08 EDT
When dhcpd first runs on a system, it exits with an error
because there is no /etc/dhcpd.leases file present.
Obviously, all it takes to fix the problem is 'touch
/etc/dhcpd.leases', but it's always nicer to have services
start without errors.

We could put a %post section in the dhcp RPM that would do a
'touch /etc/dhcpd.leases'.  For first-time runs, it would
allow dhcpd to start without the current error.  If there is
already a dhcpd.leases file, it will just have its time
stamp changed.
Comment 1 David Lawrence 1999-09-29 13:24:59 EDT
Thank you for the suggestion. It  has been forwarded to a developer
for further review.
Comment 2 Erik Troan 2000-02-23 15:59:59 EST
We do this intentionally, as dhcpd can't run without significant configuration
being done first.
Comment 3 Milan Kerslager 2001-01-22 16:00:23 EST
Putting configuration file in place is sufficient I think. This file shoul be 
very clean (ie. perfect subnet allocation for each interface/network). This is 
simply abusing (to push our users to do touch /var/lib/dhcp/dhcpd.leases or 
anything more than creating proper configuration file).
Comment 4 giulioo 2001-01-23 10:01:48 EST
*** Bug 21265 has been marked as a duplicate of this bug. ***
Comment 5 Randy Russell 2001-01-24 09:54:37 EST
It is true that one must actually configure dhcpd before it can be used, but I
would argue that the need to configure it is a sufficient safety valve:  dhcpd
won't even run if there isn't a dhcpd.conf file.  Consequently, if we were to
touch the leases file as per my earlier suggestion we would see one of two
results.  dhcpd would NOT start for people who had not done the "significant
configuration" or had done it incorrectly, which is the result we desire.  For
those who have done the configuration and done it correctly, things would work
cleanly, which is also a result we desire.  It's an admittedly trivial point,
but our current approach does open the door for someone who has configured dhcpd
correctly for the first time wondering if perhaps they have configured it
incorrectly.

We might find it beneficial to place the sample dhcpd.conf that is in the docs
in /etc as dhcpd.conf.sample.  I don't think having an actual /etc/dhcpd.conf
would be a good thing, but having the sample in /etc might help a few people
out.  (I personally think they should be looking the docs directory as a matter
of habit, but a lot of people don't and I've had multiple people tell me they
would like to see a sample configuration in /etc.)
Comment 6 Milan Kerslager 2001-01-24 10:11:48 EST
So please do at least one of the discussed cases. The second (with sample of 
configuration file) could be nice but don't forget to write inside something 
about need to touch the leases file.
Comment 7 Need Real Name 2001-04-25 11:40:37 EDT
This is really braindead behaviour as there is _NO_ user notification that 
configuration must take place and no sample dhcpd.conf installed.  After scping 
across my pre-prepared dhcpd.conf, the rc script still failed.  No messages 
were sent to syslog.  Only upon running it manually did I discover the leases 
file was missing.

How about a little feedback on "this won't work out of the box -- do this then 
this to make it work".  Better yet, how about the rc script actually _does_ 
something when it detects a missing lease or config file?
Comment 8 Ryan Weiss 2001-05-06 00:42:25 EDT
*** Bug 38768 has been marked as a duplicate of this bug. ***
Comment 9 Brian Rozmierski 2001-05-06 09:24:54 EDT
Another example to point out is when a fresh configuration is done with 
linuxconf. (Having usually done it manually, and only done it with linuxconf 
once...) Linuxconf seems to catch most of the obvious errors, but it doesn't go 
and touch the leases file either. It just blindly tries to start the daemon and 
exits with an error. Having the rpm touch the file seems like a trivial fix, so 
much so that I fail to see why it couldn't have been done a long time ago.
Comment 10 Elliot Lee 2001-07-16 17:38:18 EDT
Will have it as %config(noreplace) in rawhide.

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