Bug 150267

Summary: dhcpd gives no free leases to dhcprequest
Product: Red Hat Enterprise Linux 4 Reporter: seaq servicios <linux>
Component: dhcpAssignee: Jason Vas Dias <jvdias>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: dkl, sibel.sisadmin
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://lists.tinysofa.org/pipermail/tinysofa-discuss/2005-February/000509.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-10 16:19:18 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 seaq servicios 2005-03-04 00:27:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041110 Firefox/1.0

Description of problem:

when a client tries to discover dhcp server, dhcpd answer with a no
free leases 

when a client tries to request an ip address form dhcp server, dhcpd
answer with unknown lease

DHCPDISCOVER from xx:xx:xx:xx:xx:xx via eth0: network 10.0.0.0/24: no
free leases

Version-Release number of selected component (if applicable):
dhcp-3.0.1-12_EL

How reproducible:
Always

Steps to Reproduce:
1.install and configure dhcp-3.0.1-12_EL
2.use a client to get an ip from dhcp
3.it gets the error message with NO IP assigned

    

Actual Results:  the client never gets an ip.

Expected Results:  the client must get an ip (this is the whole point)

Additional info:

i installed rhel3`s dhcp and it worked fine!

this is the package dhcp-3.0.1-10_EL3. 

just deinstalled rhel4's dhcpd and installed rhel3, 

with no config modifications the client got its ip fine.

Comment 1 Jason Vas Dias 2005-03-07 17:56:10 UTC
Did you try to rebuild dhcp ?

The dhcp-3.0.1-12_EL package was built on Nov 17th 2004,
with compiler 3.4.3-2.EL4 and that is the version that 
was tested, when no such problems were found .

Then, the gcc compiler in RHEL-4 was upgraded to 3.4.3-9_EL4 .
This version of the compiler has bug #144358, which causes it
to miscompile dhcpd.

dhcpd compiled with compilers >= 3.4.3-9 and < 3.4.3-13 will emit
messages like:

dhcpd: Lease with bogus binding state: 257

and return 'no free leases' to all lease requests - nasty!

Please check that your dhcp package was compiled on Nov 17, with
the command:
# perl -e 'print scalar(localtime('\
          `rpm -qp dhcp-3.0.1-12_EL.i386.rpm \
           --queryformat '%{BUILDTIME}'`\
           ')),"\n";'

If you have the dhcp-3.0.1-12_EL.i386.rpm package in the local 
directory, or if you have the dhcp package installed:

# perl -e 'print scalar(localtime('\
          `rpm -q dhcp-3.0.1-12_EL \
           --queryformat '%{BUILDTIME}'`\
           ')),"\n";'

The output of this command should read:
Wed Nov 17 13:14:51 2004

If not, and dhcp was built later than Nov 17,
you have a mis-compiled and untested version 
of the dhcp-3.0.1-12_EL package - please let 
me know where you obtained it .

Thank you!





Comment 2 Jason Vas Dias 2005-03-10 16:19:18 UTC
All the dhcp-3.0.1-12_EL packages I can find in the RHEL-4 release
repos have the correct build date: Wed Nov 17 13:14:51 2004 -
and this problem cannot be duplicated with this release .
Moreover, dhcp-3.0.1-38_EL4 in RHEL-4-U1 has been modified to 
workaround the bug in gcc-3.4.3-9 . The only explanation I can
think of for this problem is that you attempted to rebuild the
dhcp package with the broken compiler. To rebuild dhcp-3.0.1-12_EL,
install the src.rpm, and then change these lines in 
/usr/src/redhat/SPECS/dhcp.spec:
   RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's/\ \-mtune\=[^\=\ ]*//'`
   ./configure --copts "$RPM_OPT_FLAGS"
   make %{?_smp_mflags} CC="gcc32"
(ensure you have the compat-gcc-32-3.2.3-47.3 package installed) .
Then rebuild with :
   rpmbuild -ba /usr/src/redhat/SPECS/dhcp.spec
and install the resulting packages in /usr/src/redhat/RPMS .
Better yet, install the default dhcp-3.0.1-12_EL package from RedHat
or the dhcp-3.0.1-38_EL4 package in RHEL-4-U1 .
Hence, this bug is being closed as 'NOT A BUG'.



Comment 3 Sibel 2005-04-02 17:40:03 UTC
This BUG MUST NOT CLOSED Mr. Jason Vas Dias, I applied which your said, but
anything does not change. I recompiled dhcp.spec, but again I have got same
error that is called " NO FREE LEASES" What must I do???

Comment 4 Jason Vas Dias 2005-04-02 19:39:29 UTC
As I said in my previous comment #2:

  YOU CANNOT COMPILE dhcpd WITH GCC-3.4.3-9 

because gcc-3.4.3-9 has gcc bug PR/18282 BZ bug #144358 .

Installing the Red Hat built dhcp-3.0.1-12 RPMs from your CD or the web
should give you a working DHCP server - it does on my system. If it does
not on yours, please let me know.

You can download dhcp-3.0.1-38_EL4, the latest DHCP release for RHEL-4, from
   http://people.redhat.com/~jvdias 
This version has also been modified to compile correctly with gcc-3.4.3-9 .

Comment 5 Sibel 2005-04-02 23:59:10 UTC

MY PROBLEM IS SOLVED!!

Thanks for help, my dhcp problem is solved.

(In reply to comment #4)
> As I said in my previous comment #2:
> 
>   YOU CANNOT COMPILE dhcpd WITH GCC-3.4.3-9 
> 
> because gcc-3.4.3-9 has gcc bug PR/18282 BZ bug #144358 .
> 
> Installing the Red Hat built dhcp-3.0.1-12 RPMs from your CD or the web
> should give you a working DHCP server - it does on my system. If it does
> not on yours, please let me know.
> 
> You can download dhcp-3.0.1-38_EL4, the latest DHCP release for RHEL-4, from
>    http://people.redhat.com/~jvdias 
> This version has also been modified to compile correctly with gcc-3.4.3-9 .