Bug 22112 - Integration von DHCP-Patches aus UCS 2.x
Integration von DHCP-Patches aus UCS 2.x
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 2.4
Other Linux
: P5 normal (vote)
: UCS 3.0 - MS2
Assigned To: Philipp Hahn
Felix Botner
:
Depends on:
Blocks: 23718
  Show dependency treegraph
 
Reported: 2011-04-05 15:45 CEST by Moritz Muehlenhoff
Modified: 2017-10-20 15:16 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
dhcp-ldap.ldif (1.35 KB, text/plain)
2011-09-23 09:10 CEST, Stefan Gohmann
Details
policy-10.201.0.0.txt (347 bytes, text/plain)
2011-09-23 09:11 CEST, Stefan Gohmann
Details
policy-win-test.txt (347 bytes, text/plain)
2011-09-23 09:11 CEST, Stefan Gohmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Muehlenhoff univentionstaff 2011-04-05 15:45:53 CEST
Die Patches aus patches/dhcp3 müssen auf den Status bzgl. isc-dhcp geprüft werden.
Comment 1 Moritz Muehlenhoff univentionstaff 2011-04-05 16:14:55 CEST
Außerdem patches/dhcp/*
Comment 2 Stefan Gohmann univentionstaff 2011-04-19 08:05:32 CEST
Im Debian Upstream Paket ist meines Wissens mittlerweile auch der LDAP Patch vorhanden. Vielleicht kann man das irgendwie angleichen.

Zusätzlich bitte einmal alle DHCP Bugs prüfen und ggf. direkt beheben.
Comment 3 Stefan Gohmann univentionstaff 2011-08-03 15:17:01 CEST
Kein Blocker für MS1.
Comment 4 Philipp Hahn univentionstaff 2011-09-15 09:05:51 CEST
svn26809, univention-ldap_8.0.34-1.442.201109150837
Update von dhcp.schema:
 +IPv6-Attribute
 ±/dhcpHWAddress/s/IA5/Directory/ (Bug #15211)
 +/dhcpService#dhcpPrimaryDN/s/MUST/MAY/
 +/dhcpServer#dhcpServiceDN/s/MUST/MAY/
svn26811, univention-ldap_8.0.34-2.443.201109150901
± Shell quoting cleanup

svn9707, isc-dhcp_4.1.1-P1-15.6.201109141605
+ Upstream-LDAP-Patch übernommen
± Univention-Policy-Patch angepasst
- SunRay-Patch deaktiviert

svn26810, univention-dhcp_6.0.5-1.488.201109150845
* s|/etc/dhcp3|/etc/dhcp| (Bug #22112)
* Add logrotate (Bug #18002)
* debian/compat: 7
* debian/changelog: Fix description
* Add LSB headers to init scripts.
* debian/control: Drop Pre-Depends: netmask.

ChangeLog: -
Comment 5 Philipp Hahn univentionstaff 2011-09-16 17:51:55 CEST
svn9713, isc-dhcp_4.1.1-P1-15.7.201109161743
Es wurde noch ein Speicherleck gestopft und ein Fehler in univention-policy (Bug #22553) korrigiert, der dazu geführt hat, das Policies nicht angewandt wurden.
Comment 6 Stefan Gohmann univentionstaff 2011-09-17 15:41:19 CEST
Wenn ich auf einem neu installiertem System univention-dhcp installiere, dann wird kein Subnetz angelegt:

stefan@leka:~/11_wrk/svn/dev/branches/ucs-3.0/ucs/services/univention-s4-connector$ ssh root@10.201.8.1
The authenticity of host '10.201.8.1 (10.201.8.1)' can't be established.
RSA key fingerprint is 30:3c:f9:a0:39:db:7b:08:cb:6c:62:8c:77:20:08:87.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.201.8.1' (RSA) to the list of known hosts.
Password: 
Last login: Sat Sep 17 17:36:27 2011 from 192.168.0.164
root@master81:~# univention-install univention-dhcp
Ign http://testing.univention.de 3.0-0/all/ Release.gpg
Ign http://testing.univention.de/3.0/maintained/ 3.0-0/all/ Translation-de
Ign http://testing.univention.de/3.0/maintained/ 3.0-0/all/ Translation-en
Ign http://testing.univention.de 3.0-0/extern/ Release.gpg
Ign http://testing.univention.de/3.0/maintained/ 3.0-0/extern/ Translation-de
Ign http://testing.univention.de/3.0/maintained/ 3.0-0/extern/ Translation-en
Ign http://testing.univention.de 3.0-0/amd64/ Release.gpg
Ign http://testing.univention.de/3.0/maintained/ 3.0-0/amd64/ Translation-de
Ign http://testing.univention.de/3.0/maintained/ 3.0-0/amd64/ Translation-en
Ign http://testing.univention.de 3.0-0/all/ Release
Ign http://testing.univention.de 3.0-0/extern/ Release
Ign http://testing.univention.de 3.0-0/amd64/ Release
Ign http://testing.univention.de 3.0-0/all/ Packages/DiffIndex
Ign http://testing.univention.de 3.0-0/extern/ Packages/DiffIndex
Ign http://testing.univention.de 3.0-0/amd64/ Packages/DiffIndex
Ign http://testing.univention.de 3.0-0/all/ Packages
Ign http://testing.univention.de 3.0-0/extern/ Packages                                                                                                                                            
Ign http://testing.univention.de 3.0-0/amd64/ Packages                                                                                                                                             
OK   http://testing.univention.de 3.0-0/all/ Packages                                                                                                                                              
OK   http://testing.univention.de 3.0-0/extern/ Packages                                                                                                                                           
OK   http://testing.univention.de 3.0-0/amd64/ Packages                                                                                                                                            
Paketlisten werden gelesen...                                                                                                                                                                      
Paketlisten werden gelesen...                                                                                                                                                                      
Abhängigkeitsbaum wird aufgebaut...                                                                                                                                                                
Statusinformationen werden eingelesen...                                                                                                                                                           
Die folgenden zusätzlichen Pakete werden installiert:                                                                                                                                              
  isc-dhcp-server isc-dhcp-server-ldap                                                                                                                                                             
Die folgenden NEUEN Pakete werden installiert:                                                                                                                                                     
  isc-dhcp-server isc-dhcp-server-ldap univention-dhcp                                                                                                                                             
0 aktualisiert, 3 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.                                                                                                                        
Es müssen 799 kB an Archiven heruntergeladen werden.                                                                                                                                               
Nach dieser Operation werden 1.987 kB Plattenplatz zusätzlich benutzt.                                                                                                                             
Möchten Sie fortfahren [J/n]?                                                                                                                                                                      
WARNUNG: Die folgenden Pakete können nicht authentifiziert werden!                                                                                                                                 
  isc-dhcp-server isc-dhcp-server-ldap univention-dhcp                                                                                                                                             
Authentifizierungswarnung überstimmt.                                                                                                                                                              
Hole:1 http://testing.univention.de/3.0/maintained/ 3.0-0/amd64/ isc-dhcp-server 4.1.1-P1-15.7.201109161743 [412 kB]                                                                               
Hole:2 http://testing.univention.de/3.0/maintained/ 3.0-0/amd64/ isc-dhcp-server-ldap 4.1.1-P1-15.7.201109161743 [377 kB]
Hole:3 http://testing.univention.de/3.0/maintained/ 3.0-0/all/ univention-dhcp 6.0.5-1.488.201109150845 [10,6 kB]
Vorkonfiguration der Pakete ...
Es wurden 799 kB in 0 s geholt (2.261 kB/s)
Vormals abgewähltes Paket isc-dhcp-server wird gewählt.
(Lese Datenbank ... 37668 Dateien und Verzeichnisse sind derzeit installiert.)
Entpacken von isc-dhcp-server (aus .../isc-dhcp-server_4.1.1-P1-15.7.201109161743_amd64.deb) ...
Vormals abgewähltes Paket isc-dhcp-server-ldap wird gewählt.
Entpacken von isc-dhcp-server-ldap (aus .../isc-dhcp-server-ldap_4.1.1-P1-15.7.201109161743_amd64.deb) ...
»Umleitung von /usr/sbin/dhcpd zu /usr/sbin/dhcpd-noldap durch isc-dhcp-server-ldap« wird hinzugefügt
Vormals abgewähltes Paket univention-dhcp wird gewählt.
Entpacken von univention-dhcp (aus .../univention-dhcp_6.0.5-1.488.201109150845_all.deb) ...
Trigger für man-db werden verarbeitet ...
isc-dhcp-server (4.1.1-P1-15.7.201109161743) wird eingerichtet ...
Generating /etc/default/isc-dhcp-server...
Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed!
 failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
isc-dhcp-server-ldap (4.1.1-P1-15.7.201109161743) wird eingerichtet ...
univention-dhcp (6.0.5-1.488.201109150845) wird eingerichtet ...
File: /etc/dhcp/dhcpd.conf
File: /etc/init.d/isc-dhcp-server
File: /etc/logrotate.d/univention-dhcp
Create dhcpd/autostart
File: /etc/dhcp/dhcpd.conf
File: /etc/dhcp/dhcpd.conf
Create dhcpd/restart/listener
Object created: cn=deadlock81.local,cn=dhcp,dc=deadlock81,dc=local
Object created: cn=master81,cn=deadlock81.local,cn=dhcp,dc=deadlock81,dc=local
Object exists: cn=services,cn=univention,dc=deadlock81,dc=local
Object created: cn=DHCP,cn=services,cn=univention,dc=deadlock81,dc=local
Object modified: cn=master81,cn=dc,cn=computers,dc=deadlock81,dc=local
Starting univention-dhcp daemon.
warning: univention-dhcp: unable to open supervise/ok: file does not exist
done.
Restarting univention-directory-listener daemon.
ok: run: univention-directory-listener: (pid 1840) 0s, normally down
done.
root@master81:~# ucr search --brief ^interfaces
interfaces/eth0/address: 10.201.8.1
interfaces/eth0/broadcast: 10.201.255.255
interfaces/eth0/netmask: 255.255.0.0
interfaces/eth0/network: 10.201.0.0
interfaces/handler: ifplugd
root@master81:~# 
root@master81:~# univention-ldapsearch -LLL -b cn=deadlock81.local,cn=dhcp,dc=deadlock81,dc=local
dn: cn=deadlock81.local,cn=dhcp,dc=deadlock81,dc=local
objectClass: top
objectClass: univentionDhcpService
objectClass: univentionObject
univentionObjectType: dhcp/service
cn: deadlock81.local

dn: cn=master81,cn=deadlock81.local,cn=dhcp,dc=deadlock81,dc=local
objectClass: top
objectClass: dhcpServer
objectClass: univentionObject
dhcpServiceDN: cn=deadlock81.local,cn=dhcp,dc=deadlock81,dc=local
univentionObjectType: dhcp/server
cn: master81
Comment 7 Philipp Hahn univentionstaff 2011-09-19 10:57:26 CEST
Die Expansion von ${!interfaces_*} darf nicht gequotet werden.
Und es wurde noch ein Verschreiber von is_true() korrigiert.

# univention-ldapsearch -LLL -b cn=dhcp,`ucr get ldap/base` dn
dn: cn=dhcp,dc=phahn64,dc=de
dn: cn=phahn64.de,cn=dhcp,dc=phahn64,dc=de
dn: cn=mas86,cn=phahn64.de,cn=dhcp,dc=phahn64,dc=de
dn: cn=10.200.17.0,cn=phahn64.de,cn=dhcp,dc=phahn64,dc=de

svn26926, univention-dhcp_6.0.5-2.489.201109191051

ChangeLog: ±0
Comment 8 Philipp Hahn univentionstaff 2011-09-20 14:33:13 CEST
Im Gegensatz zu dhcpService enthält univentionDhcpService nicht notwendigerweise einen Backlink auf das {univention,}dhcpServer-Objekt. Für die Rückwärtskompatibilität auf UCS-2.x wird kein dhcp{Primary,Secondary,Server}DN-Attribut am Service erwartet.

svn9718, isc-dhcp_4.1.1-P1-15.8.201109201128

ChangeLog: ±0


Beim Testen ist noch folgendes aufgefallen:
Es muß unbedingt das neue DHCP-Schema aus univention-ldap-config auf dem DC-Master installiert sein. Der isc-dhcp-server-ldap verwendet intern einen LDAP-Filter der Form "(!(|(objectClass=dhcpTSigKey)(objectClass=dhcpClass)(objectClass=dhcpFailOverPeer)))". Solange TSigKey und FailOverPeer nicht im Schema bekannt sind, liefert die Abfrage keine Ergebnisse, so daß der DHCP-Server sich über eine fehlende Subnetz-Definition beschwert.
Comment 9 Philipp Hahn univentionstaff 2011-09-20 15:03:41 CEST
Das Join-Skript von univention-dhcp überprüft jetzt wegen Comment 8, ob das neuere LDAP-Schema für DHCP verfügbar ist und bricht dann den Join-Vorgang ab. Für die Rückportierung des LDAP-Schemas für UCS-2.4-4 gibt es nun Bug #23718.

svn27013, univention-dhcp_6.0.5-6.493.201109201500
ChangeLog: ±0̣
Comment 10 Stefan Gohmann univentionstaff 2011-09-23 09:10:03 CEST
Aus der daemon.log:

Sep 23 10:41:15 master51 dhcpd: DHCPDISCOVER from 52:54:00:bf:c4:15 via eth0: network 10.201.0.0/16: no free leases
Sep 23 10:41:30 master51 dhcpd: LDAP-HOST line 2: expecting a parameter or declaration
Sep 23 10:41:30 master51 dhcpd: option domain-name-servers 10.201.5.1;


Versionen:
isc-dhcp-server                            4.1.1-P1-15.8.201109201128
univention-dhcp                            6.0.5-7.494.201109201733
Comment 11 Stefan Gohmann univentionstaff 2011-09-23 09:10:57 CEST
Created attachment 3552 [details]
dhcp-ldap.ldif
Comment 12 Stefan Gohmann univentionstaff 2011-09-23 09:11:16 CEST
Created attachment 3553 [details]
policy-10.201.0.0.txt
Comment 13 Stefan Gohmann univentionstaff 2011-09-23 09:11:34 CEST
Created attachment 3554 [details]
policy-win-test.txt
Comment 14 Felix Botner univentionstaff 2011-09-28 12:05:00 CEST
Gleiches Problem hier. Komisch ist, dass wenn man die Datei "ldap-debug-file" erzeugt, bei mir sah diese so aus

#DHCP Service
option domain-name "tester.test";
option domain-name-servers 10.200.7.144;
subnet 10.200.7.0 netmask 255.255.255.0 {
option domain-name "tester.test";
option domain-name-servers 10.200.7.144;
}
host ipman01 {
hardware ethernet 00:01:01:02:03:04;
ddns-hostname ipman01;
fixed-address 10.200.7.253;
option domain-name "tester.test";
option domain-name-servers 10.200.7.144;
}
host slave1 {
hardware ethernet 52:54:00:25:f0:b7;
ddns-hostname slave1;
fixed-address 10.200.7.181;
option domain-name "tester.test";
option domain-name-servers 10.200.7.144;
}

und diese für den dhcpd verwendet

-> dhcpd -cf /var/log/dhcp-ldap-startup.log -f -d 

dann klappt das dhcp
Comment 15 Stefan Gohmann univentionstaff 2011-10-11 13:19:26 CEST
Wenn ich die Policy lösche, dann bekomme ich:

root@master91:~# gdb /usr/sbin/dhcpd
GNU gdb (GDB) 7.0.1-univention
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/sbin/dhcpd...(no debugging symbols found)...done.
(gdb) r -f
Starting program: /usr/sbin/dhcpd -f
[Thread debugging using libthread_db enabled]
Internet Systems Consortium DHCP Server 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Wrote 0 leases to leases file.
Listening on LPF/eth0/52:54:00:2f:10:6d/10.201.0.0/16
Sending on   LPF/eth0/52:54:00:2f:10:6d/10.201.0.0/16
Sending on   Socket/fallback/fallback-net

Program received signal SIGSEGV, Segmentation fault.
0xb7d1845c in strncat () from /lib/libc.so.6
(gdb) bt
#0  0xb7d1845c in strncat () from /lib/libc.so.6
#1  0x0808a628 in ?? ()
#2  0x0808c858 in ?? ()
#3  0x0808f9cf in ?? ()
#4  0x080779a5 in ?? ()
#5  0x0804ee30 in ?? ()
#6  0x080560ba in ?? ()
#7  0x08056704 in ?? ()
#8  0x080a524d in ?? ()
#9  0x080972a3 in ?? ()
#10 0x080c3ab2 in ?? ()
#11 0x08099098 in ?? ()
#12 0x0804cba0 in ?? ()
#13 0xb7cbbc76 in __libc_start_main () from /lib/libc.so.6
#14 0x0804acd1 in ?? ()
(gdb) 

isc-dhcp-server 4.1.1-P1-15.8.201109201128
Comment 16 Stefan Gohmann univentionstaff 2011-10-11 14:50:28 CEST
Diesmal mit mehr Infos:

(gdb) bt
#0  0xb7d1745c in strncat () from /lib/libc.so.6
#1  0x0808a628 in x_strncat (dst=0xb7de4ff4 "|\r\024", src=0x80d9490 "fixed-address ", dst_size=8192) at ldap.c:95
#2  0x0808c858 in ldap_parse_options (ent=<value optimized out>, group=<value optimized out>, type=<value optimized out>, host=0x817a760, class=0x0) at ldap.c:2390
#3  0x0808f9cf in find_haddr_in_ldap (hp=0xbfffdc9c, htype=1, hlen=6, haddr=0xbfffe2d4 "RT", file=0x80d6374 "dhcp.c", line=3292) at ldap.c:2605
#4  0x080779a5 in find_hosts_by_haddr (hp=0xbfffdc9c, htype=1, haddr=0xbfffe2d4 "RT", hlen=6, file=0x80d6374 "dhcp.c", line=3292) at mdb.c:607
#5  0x0804ee30 in find_lease (lp=0xbfffe11c, packet=0x817ae78, share=0x817b208, ours=0x0, peer_has_leases=0xbfffe118, ip_lease_in=0x0, file=0x80d6374 "dhcp.c", line=275) at dhcp.c:3290
#6  0x080560ba in dhcpdiscover (packet=0x817ae78, ms_nulltp=0) at dhcp.c:274
#7  0x08056704 in dhcp (packet=0x817ae78) at dhcp.c:221
#8  0x080a524d in do_packet (interface=0x817b148, packet=0xbfffe2b8, len=300, from_port=17408, from=..., hfrom=0xbffff2ce) at options.c:3751
#9  0x080972a3 in got_one (h=0x817b148) at discover.c:1397
#10 0x080c3ab2 in omapi_one_dispatch (wo=0x0, t=0x0) at dispatch.c:520
#11 0x08099098 in dispatch () at dispatch.c:92
#12 0x0804cba0 in main (argc=2, argv=0xbffff834) at dhcpd.c:841
Comment 17 Philipp Hahn univentionstaff 2011-10-11 17:31:52 CEST
Ursache war ein Fehler im FOREACH_FIXED_ADDRESS-Macro: Dort wurde implizit nach cfile->inbuf geschrieben. cfile gibt es zwar innerhalb von ldap_parse_options(), doch ist dies zu diesem Zeitpunkt noch uninitialisiert.

Dem Macro wird nun explizit der Buffer cfile->inbuf bzw. option_buffer übergeben.

svn9772, isc-dhcp_4.1.1-P1-15.9.201110111550

ChangeLog: ±0


Debug-Infos: In debian/rules 'CFLAGS += -O0 -DDEBUG_LDAP=1' setzen und vor dem 'mkdir -p patched-ldap' ein 'exit 1' einbauen, Paket per 'dpkg-buildpackage -uc -us -b' anfangen zu bauen und dann lokal per 'gdb ./server/dhcpd' starten.
Comment 18 Stefan Gohmann univentionstaff 2011-11-18 10:24:39 CET
Ein paar grundsätzliche Tests sollten reichen, der Rest erfolgt bei den Produkttests.
Comment 19 Felix Botner univentionstaff 2011-11-21 16:05:42 CET
Nur grundlegende Tests auf i386 (Neu-Installation ) / amd64 (Update)

 * host Einträge (mit Policies)
 * mehrere shared Subnet (mit Policies)
 * Pools (mit Policies)

shared Subnet und Pools wurden nur via /var/log/dhcp-ldap-startup.log getestet. Alles weitere dann in der Produkt-Tests.
Comment 20 Sönke Schwardt-Krummrich univentionstaff 2011-12-13 15:49:14 CET
UCS 3.0-0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer
neueren Version von UCS erneut auftreten, so sollte dieser Bug dupliziert
werden: "Clone This Bug"