Bug 32557 - make DHCP options available in UMC
make DHCP options available in UMC
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - DHCP
UCS 4.2
Other Linux
: P5 enhancement (vote)
: UCS 4.2
Assigned To: Florian Best
Philipp Hahn
: interim-1
: 3374 27243 36226 (view as bug list)
Depends on: 26838 33223
Blocks: 31383 35235 43748
  Show dependency treegraph
 
Reported: 2013-09-11 12:28 CEST by Ingo Steuwer
Modified: 2018-04-10 18:14 CEST (History)
10 users (show)

See Also:
What kind of report is it?: Feature Request
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: 2013093021001514
Bug group (optional): Usability
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Steuwer univentionstaff 2013-09-11 12:28:49 CEST
The implementation of Bug #26838 for individual DHCP options is only available at the command line, it should be also configurable in the web interface.
Comment 1 Ingo Steuwer univentionstaff 2013-10-01 10:42:35 CEST
requested by 2013093021001514
Comment 2 Philipp Hahn univentionstaff 2013-10-01 14:02:24 CEST
udm settings/extended_attribute create \
  --position cn=custom\ attributes\,cn=univention\,"$(ucr get ldap/base)" \
  --set translationLongDescription=$'de_DE: Zus\303\244tzliche Optionen f\303\274r DHCP' \
  --set objectClass=dhcpOptions \
  --set module=dhcp/service \
  --set module=dhcp/pool \
  --set module=dhcp/host \
  --set module=dhcp/shared \
  --set module=dhcp/sharedsubnet \
  --set module=dhcp/subnet \
  --set translationTabName=de_DE:\ DHCP\ Optionen \
  --set shortDescription=DHCP\ Option \
  --set translationShortDescription=de_DE:\ DHCP\ Optionen \
  --set longDescription=Additional\ options\ for\ DHCP \
  --set tabName=DHCP\ Options \
  --set syntax=string \
  --set name=dhcpOption \
  --set mayChange=1 \
  --set multivalue=1 \
  --set ldapMapping=dhcpOption \
  --set deleteObjectClass=1
Comment 3 Philipp Hahn univentionstaff 2013-11-08 09:57:05 CET
*** Bug 27243 has been marked as a duplicate of this bug. ***
Comment 4 Philipp Hahn univentionstaff 2013-11-08 23:42:11 CET
*** Bug 3374 has been marked as a duplicate of this bug. ***
Comment 5 Philipp Hahn univentionstaff 2013-11-11 08:53:50 CET
Also see patch in attachment 5596 [details] at Bug #33223
Comment 6 Philipp Hahn univentionstaff 2016-09-06 10:30:53 CEST
Fixed example:

udm settings/extended_attribute create \
  --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
  --set name=dhcpOption \
  --set objectClass=dhcpOptions \
  --set ldapMapping=dhcpOption \
  --set module=dhcp/service \
  --set module=dhcp/pool \
  --set module=dhcp/host \
  --set module=dhcp/shared \
  --set module=dhcp/sharedsubnet \
  --set module=dhcp/subnet \
  --set shortDescription='DHCP Option' \
  --set translationShortDescription='"de_DE" "DHCP Optionen"' \
  --set longDescription='Additional options for DHCP' \
  --set translationLongDescription='"de_DE" "Zusätzliche Optionen für DHCP"' \
  --set tabName='Low-level DHCP configuration' \
  --set translationTabName='"de_DE" "Experten DHCP Konfiguration"' \
  --set tabAdvanced=1 \
  --set syntax=string \
  --set mayChange=1 \
  --set multivalue=1 \
  --set deleteObjectClass=1
udm settings/extended_attribute create \
  --position "cn=custom attributes,cn=univention,$(ucr get ldap/base)" \
  --set name=dhcpStatements \
  --set objectClass=dhcpOptions \
  --set ldapMapping=dhcpStatements \
  --set module=dhcp/service \
  --set module=dhcp/pool \
  --set module=dhcp/host \
  --set module=dhcp/shared \
  --set module=dhcp/sharedsubnet \
  --set module=dhcp/subnet \
  --set shortDescription='DHCP Statements' \
  --set translationShortDescription='"de_DE" "DHCP Anweisungen"' \
  --set longDescription='Additional statements for DHCP' \
  --set translationLongDescription='"de_DE" "Zusätzliche Anweisungen für DHCP"' \
  --set tabName='Low-level DHCP configuration' \
  --set translationTabName='"de_DE" "Experten DHCP Konfiguration"' \
  --set tabAdvanced=1 \
  --set syntax=TextArea \
  --set fullWidth=1 \
  --set mayChange=1 \
  --set multivalue=1 \
  --set deleteObjectClass=1
Comment 7 Florian Best univentionstaff 2016-11-02 21:00:52 CET
DHCP Options and DHCP statements have been added to the layout for all DHCP modules. Including dhcp/server (which was not set in your extended attribute). The object class dhcpServer provide these attributes, too. So no reason to hide it there.

Is there a reason why you decided to have TextArea syntax and multivalue field for dhcpStatements?

TODO: univentionDhcpPool needs to allow the attribute dhcpStatements or it has to be removed from dhcp/pool. Please decide.

univention-directory-manager-modules (12.0.5-1):
r74042 | Bug #32557: Add DHCP options and DHCP statements to DHCP objects
Comment 8 Philipp Hahn univentionstaff 2016-11-03 08:55:15 CET
(In reply to Florian Best from comment #7)
> DHCP Options and DHCP statements have been added to the layout for all DHCP
> modules. Including dhcp/server (which was not set in your extended
> attribute). The object class dhcpServer provide these attributes, too. So no
> reason to hide it there.

Wrong: the dhcp/service object is only used to find the dhcp/service object a DHCP server should server ("find the service which contains a server entry matching my hostname"). The entry is not used to generate any statements for the DHCP configuration, so setting anything there does nothing.
Therefor I choose to not provide the settings there as that would surely leads to customers asking for why their statements there don't work.

> Is there a reason why you decided to have TextArea syntax and multivalue
> field for dhcpStatements?

While options are short (man 5 dhcp-options), statements can consists of huge texts: You can put your complete hand-crafted dhcpd.conf in there!
See <http://forum.univention.de/viewtopic.php?f=48&t=5952&p=22224&hilit=dhcpStatement#p22224> for an example of this.

> TODO: univentionDhcpPool needs to allow the attribute dhcpStatements or it
> has to be removed from dhcp/pool. Please decide.

/usr/share/univention-ldap/schema/dhcp.schema:
|objectclass ( 2.16.840.1.113719.1.203.6.4 
|        NAME 'dhcpPool' 
|        MAY ( ... $ dhcpStatements $ ... $ dhcpOption ) 
So the original allows it, but the UCS variant doesn't.
Comment 9 Florian Best univentionstaff 2017-01-06 12:19:21 CET
univention-ldap (13.0.0-12):
r75614 | Bug #32557: allow attribute dhcpStatements at dhcpPool (dhcp/pool)

univention-directory-manager-modules (12.0.11-4):
r75613 | Bug #32557: remove options+statements from dhcp/server

r75615 | Changelog Bug #32557
Comment 10 Philipp Hahn univentionstaff 2017-01-19 12:53:06 CET
OK: r74042 r75613 r75614 r75615

OK: service: enabled by default for old installations, not for newly created services
OK: server: not available
OK: subnet
OK: pool
OK: host
OK: /var/log/dhcp-ldap-startup.log

OK: Changelog
Comment 11 Stefan Gohmann univentionstaff 2017-04-04 18:30:01 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".
Comment 12 Philipp Hahn univentionstaff 2017-04-07 12:27:40 CEST
*** Bug 36226 has been marked as a duplicate of this bug. ***