Univention Bugzilla – Bug 42758
create_ou via python does only create dhcp subnets if interface starts with 'eth'
Last modified: 2023-06-12 15:47:25 CEST
I have installed UCS@school together with UVMM. Therefore my interfaces configuration contains a bridge interface: # ucr dump | grep interfaces interfaces/br0/address: 10.200.27.117 interfaces/br0/broadcast: 10.200.27.255 interfaces/br0/netmask: 255.255.255.0 interfaces/br0/network: 10.200.27.0 interfaces/br0/options/0: bridge_fd 0 interfaces/br0/options/1: bridge_ports eth0 interfaces/br0/type: static interfaces/eth0/start: true interfaces/eth0/type: manual interfaces/handler: ifplugd When I create a school via the python lib in a multiserver environment the DHCP Subnets aren't moved/created into the OU. The code which causes this is: ucs-school-lib/python/models/dhcp.py 96 » » » for interface_name in set([key.split('/')[1] for key in ucr.keys() if key.startswith('interfaces/eth')]): The test case "30_import-create_ou_via_python_api" fails. We should not operate on UCR directly but use the library instead.
This issue has been filled against UCS@school 4.1 (R2). The maintenance with bug and security fixes for UCS@school 4.1 (R2) has ended on 5th of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3 (or later). Please contact your partner or Univention for any questions. If this issue still occurs in newer UCS versions, please use "Clone this bug" or simply reopen the issue. In this case please provide detailed information on how this issue is affecting you.
Code is still present exactly the same: ucs-school-import/usr/share/ucs-school-import/scripts/ucs-school-import: key.split("/")[1] for key in ucr.keys() if key.startswith("interfaces/eth") ucs-school-lib/modules/ucsschool/lib/models/dhcp.py: key.split("/")[1] for key in ucr.keys() if key.startswith("interfaces/eth")