Bug 17289 - DHCP Tests
DHCP Tests
Status: NEW
Product: UCS Test
Classification: Unclassified
Component: DHCP
unspecified
All Linux
: P5 enhancement (vote)
: ---
Assigned To: UCS maintainers
:
: 16664 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-08 10:06 CET by Philipp Hahn
Modified: 2018-04-13 13:40 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
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
ucs-test-Skripte für DHCP (12.69 KB, application/octet-stream)
2010-01-08 10:17 CET, Philipp Hahn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2010-01-08 10:06:55 CET
Beim Produkttest für UCS-2.3 sind jede Menge neuer ucs-tests für den Bereich DHCP entstanden. Diese können derzeit noch nicht automatisch ausgeführt werden, weil der Test eine spezielle Netzwerkumgebung mit zwei (virtuellen) Netzwerkkarten braucht, die am besten keine Verbindung zu anderen Rechnern habe. (Zum Produkttest gehört auch die Vergabe an IP-Adressen an unbekannte Rechner, weshalb immer wieder unbeteiligte Rechner plötzlich IP-Adressen vom Testsystem bezogen haben).

1. Es werden zwei Netzwerkinterfaces benötigt, da auf einem der dhcpd lauscht und der zweite für den dhclient verwendet wird.
2. Bisher werden fast alle Tests nur auf dem Master, da ziemlich viele Änderungen und Neustarts notwendig sind; ansonsten wären zwei Netzwerkverbindung notwendig: Eine zum Konfigurieren des dhcpd und zur Rückmeldung des Testergebnisses, die andere für das Durchführen des Tests.
3. Das Nachbauen mittels Linux-eigenen Hilfsmitteln wie ether-bridge ist bisher nicht gelungen und wäre eine Alternative. Ggf. tun/tap?

Tests derzeit nur in ~phahn/src/dev/internal/ucs-test/scripts-21_dhcp/
Comment 1 Philipp Hahn univentionstaff 2010-01-08 10:17:05 CET
Created attachment 2200 [details]
ucs-test-Skripte für DHCP
Comment 2 Stefan Gohmann univentionstaff 2010-03-05 11:48:48 CET
Bitte hinzufügen.
Comment 3 Stefan Gohmann univentionstaff 2010-07-22 21:34:14 CEST
Ein Test schlägt auf den Auto-Update Tests fehl:

************************************************************
* Starting '/usr/share/ucs-test/scripts/21_dhcp/10basic20boot' at Do 22. Jul 01:49:55 CEST 2010
* Message: 'DHCP: Check policy/boot'
info 2010-07-22 01:49	 required package univention-config installed
info 2010-07-22 01:49	 required package univention-directory-manager installed
info 2010-07-22 01:49	 required package univention-dhcp installed
info 2010-07-22 01:49	 EXECUTING: univention-directory-manager 'dhcp/subnet' create --superordinate 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --position 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --set 'subnet'='229.171.119.0' --set 'subnetmask'='24'
Object created: cn=229.171.119.0,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:49	 created dhcp/subnet object 229.171.119.0
info 2010-07-22 01:49	 EXECUTING: univention-directory-manager 'dhcp/host' create --superordinate 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --position 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --set 'host'='dhcptest' --set 'hwaddress'='ethernet 16:b9:ab:21:66:7b' --set 'fixedaddress'='229.171.119.2'
Object created: cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:49	 created dhcp/host object dhcptest
info 2010-07-22 01:49	 EXECUTING: univention-directory-manager 'policies/dhcp_boot' create --position "cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test" --set 'name'='policy1' --set 'boot_server'='1.2.3.4' --set 'boot_filename'='filename1'
Object created: cn=policy1,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:49	 created policies/dhcp_boot object policy1
info 2010-07-22 01:49	 EXECUTING: univention-directory-manager 'policies/dhcp_boot' create --position "cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test" --set 'name'='policy2' --set 'boot_server'='1.2.3.5' --set 'boot_filename'='filename2'
Object created: cn=policy2,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:49	 created policies/dhcp_boot object policy2
error 2010-07-22 01:51	 **************** Test failed above this line ****************
error 2010-07-22 01:51	 dhclient did return error: 2
error 2010-07-22 01:51	 *** Check failed, but this might be caused by the error above ***
error 2010-07-22 01:51	 /tmp/tmp.zSWPDQBuni/dhclient.lease is empty
error 2010-07-22 01:51	 *** Check failed, but this might be caused by the error above ***
error 2010-07-22 01:51	 filename "pxelinux.0";
info 2010-07-22 01:51	 EXECUTING: univention-directory-manager 'dhcp/host' modify --superordinate 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --dn "cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test" --policy-reference cn=policy1,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
Object modified: cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:51	 dhcp/host object dhcptest modified
info 2010-07-22 01:51	 OK: filename "filename1";
info 2010-07-22 01:51	 EXECUTING: univention-directory-manager 'dhcp/service' modify --superordinate 'cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --dn "cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test" --policy-reference cn=policy2,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
Object modified: cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:51	 dhcp/service object amd64.auto.update.test modified
info 2010-07-22 01:51	 OK: filename "filename1";
info 2010-07-22 01:51	 EXECUTING: univention-directory-manager 'dhcp/host' modify --superordinate 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --dn "cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test" --policy-dereference cn=policy1,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
Object modified: cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:51	 dhcp/host object dhcptest modified
info 2010-07-22 01:51	 OK: filename "filename2";
info 2010-07-22 01:51	 EXECUTING: univention-directory-manager 'dhcp/service' modify --superordinate 'cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --dn "cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test" --policy-dereference cn=policy2,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
Object modified: cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:51	 dhcp/service object amd64.auto.update.test modified
info 2010-07-22 01:53	 OK: filename "pxelinux.0";
info 2010-07-22 01:53	 EXECUTING: univention-directory-manager 'policies/dhcp_boot' remove --dn "cn=policy1,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test"
Object removed: cn=policy1,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:53	 removed policies/dhcp_boot object policy1
info 2010-07-22 01:53	 EXECUTING: univention-directory-manager 'policies/dhcp_boot' remove --dn "cn=policy2,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test"
Object removed: cn=policy2,cn=boot,cn=dhcp,cn=policies,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:53	 removed policies/dhcp_boot object policy2
info 2010-07-22 01:53	 EXECUTING: univention-directory-manager 'dhcp/host' remove --superordinate 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --dn "cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test"
Object removed: cn=dhcptest,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:53	 removed dhcp/host object dhcptest
info 2010-07-22 01:53	 EXECUTING: univention-directory-manager 'dhcp/subnet' remove --superordinate 'cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test' --dn "cn=229.171.119.0,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test"
Object removed: cn=229.171.119.0,cn=amd64.auto.update.test,cn=dhcp,dc=amd64,dc=auto,dc=update,dc=test
info 2010-07-22 01:53	 removed dhcp/subnet object 229.171.119.0
timeout: finish: univention-dhcp: (pid 28106) 9s, normally down
spawn unixterm /tmp/tmp.zSWPDQBuni/vde.mgmt
VDE switch V.2.2.2
(C) Virtual Square Team (coord. R. Davoli) 2005,2006,2007 - GPLv2

vde$ shutdown
RESULT: 110
END /usr/share/ucs-test/scripts/21_dhcp/10basic20boot: 110 => Test failed

* STOP
************************************************************
Comment 4 Stefan Gohmann univentionstaff 2010-07-23 06:48:35 CEST
Heute lief der Test durch, ggf. eine Timing-Problem?
Comment 5 Philipp Hahn univentionstaff 2010-07-23 08:13:08 CEST
(In reply to comment #3)
...
> info 2010-07-22 01:49     created policies/dhcp_boot object policy2
> error 2010-07-22 01:51     dhclient did return error: 2

Das ist der Aufruf von "dhcpRun --wait-restart" in Zeile 29:

Aus man dhclient:
> The -1 flag cause dhclient to try once to get a lease. If it fails, dhclient exits with exit code two.

(In reply to comment #3)
> Heute lief der Test durch, ggf. eine Timing-Problem?

Ich vermute nein, da zwischen den beiden Aufrufen ist mindestens 1 Minute vergangen, innerhalb dhclient keine Lease bekommen hat. Entweder hatte der dhcp-Daemon das Startschwierigkeiten oder etwas mit dem Aufsetzen des "Virtual Distributed Ethernet" ist schiefgelaufen ist. Da diesbezüglich aber nicht im Log steht, schwierig zu sagen.
Andererseits haben die weiteren Tests funktioniert. Mir ist aber bereits schon andere Male aufgefallen, daß der Client manchmal keine Lease bekommt. Startet man den dhclient erneut, funktioniert alles tadellos. Genaue Ursache ist mir unklar.
Comment 6 Stefan Gohmann univentionstaff 2014-09-17 08:25:07 CEST
*** Bug 16664 has been marked as a duplicate of this bug. ***
Comment 7 Philipp Hahn univentionstaff 2015-03-09 15:09:06 CET
Currently no priority - check for next PT or when someone with time is available.