Bug 27161 - Erweiterte DHCP-Optionen konfigurierbar machen
Erweiterte DHCP-Optionen konfigurierbar machen
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: LDAP
UCS@school 3.0
Other Linux
: P5 enhancement (vote)
: UCS@school 3.0 MS2
Assigned To: Andreas Büsching
Felix Botner
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-18 10:57 CEST by Andreas Büsching
Modified: 2012-06-11 06:30 CEST (History)
5 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

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Büsching univentionstaff 2012-05-18 10:57:50 CEST
Das wird auch für UCSschool benötigt

+++ This bug was initially created as a clone of Bug #26838 +++

Angefragt an Ticket #2012041821001871:
"im Zuge unseres bevorstehenden Windows-Rollouts wollen wir die Clients
automatisch mit einer wpad.dat-Datei per DHCP versorgen. Nach
Internetrecherchen ist hierzu folgendes in der dhcpd.conf einzutragen:

option wpad code 252 = text;

subnet X.X.X.0 netmask 255.255.255.0 {
…
option wpad “http://XXX/wpad.dat ”;
…
}

Die erste Zeile habe ich in der Datei /etc/dhcp/dhcpd.local
untergebracht. Die Einträge am jeweiligen Subnetz erfolgt ja über die
UMC - dort habe ich allerdings keine passende Richtlinie gefunden, um
die Zeile "option wpad “http://XXX/wpad.dat ”;"
einzutragen."
Comment 1 Andreas Büsching univentionstaff 2012-05-18 11:20:08 CEST
Es können nun DHCP-Optionen an dhcp/service, dhcp7server und dhcp/subnet Objekten gesetzt werden. Allerdings nur über UDM CLI

udm dhcp/service create .... --append option="wpad http://server/proxy.pac" ...


Zusätzlich müssen die Optionen über UCR definiert werden:

ucr set dhcpd/options/wpad/252=text

ChangeLog Eintrag wurde hinzugefügt
Comment 2 Felix Botner univentionstaff 2012-05-22 16:17:13 CEST
Setzte ich die Option zum ersten mal klappt es, danach dann nicht mehr:

-> udm dhcp/service modify --dn cn=s01,cn=dhcp,ou=s01,dc=ee,dc=rr 
--set option="wpad http://slave.ee.rr/proxy.paca
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 938, in doit
    dn=object.modify()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 344, in modify
    return self._modify(modify_childs,ignore_license=ignore_license)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 863, in _modify
    self.lo.modify(self.dn, ml, ignore_license=ignore_license)
  File "/usr/lib/pymodules/python2.6/univention/admin/uldap.py", line 385, in modify
    raise univention.admin.uexceptions.ldapError, _err2str(msg)
ldapError: Type or value exists: modify/add: objectClass: value #0 already exists

Debug Ausgabe in uldap zeigt folgendes:

ldapError: {'info': 'modify/add: objectClass: value #0 already exists', 'desc': 'Type or value exists'} [('dhcpOption', '', ['wpad http://slave.ee.rr/proxy.paca']), ('objectClass', [], ['dhcpOptions'])]
Comment 3 Andreas Büsching univentionstaff 2012-05-23 11:37:55 CEST
(In reply to comment #2)
> Setzte ich die Option zum ersten mal klappt es, danach dann nicht mehr:

Das ist jetzt korrigiert. Ausserdem wurde die Syntax auf string geändert.

Das Paket baut neu
Comment 4 Felix Botner univentionstaff 2012-05-23 12:44:40 CEST
Es gibt noch ein Problem bei dhcp/subnet

=> ldapError: Object class violation: attribute 'dhcpOption' not allowed

Das Objekt hat folgende Objektklassen

dn: cn=10.200.7.0,cn=s01,cn=dhcp,ou=s01,dc=ee,dc=rr
objectClass: top
objectClass: univentionDhcpSubnet
objectClass: univentionObject
objectClass: univentionPolicyReference


Für univentionDhcpSubnet ist dhcpOption aber nicht definiert? Muss wahrscheinlich noch die OC dhcpOptions eingebunden werden
Comment 5 Andreas Büsching univentionstaff 2012-05-24 12:22:01 CEST
Es wurden jetzt noch ein paar Anpassungen vorgenommen. Die Tests waren für die folgenden Objekttypen erfolgreich:

dhcp/service
dhcp/server
dhcp/subnet
dhcp/sharedsubnet

Getestet wurde: hinzufügen (mehrfach), entfernen
Comment 6 Felix Botner univentionstaff 2012-05-24 12:56:00 CEST
OK
Comment 7 Stefan Gohmann univentionstaff 2012-06-11 06:30:08 CEST
UCS@school 3.0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer  neueren Version von UCS@school erneut auftreten, so sollte dieser Bug dupliziert werden: "Clone This Bug"