When you install a new single school, the demo school is created, if you do not specifically forbid this, with setting an ucr variable.
When remove the demoschool dhcp is not starting and working anymore.
Feb 05 11:03:17 ucs1 systemd: univention-dhcp.service: Unit entered failed state. Feb 05 11:03:17 ucs1 systemd: univention-dhcp.service: Failed with result 'exit-code'. Feb 05 11:03:21 ucs1 dhcpd: Error: Cannot find LDAP entry matching (&(objectClass=dhcpServer)(cn=ucs1)) Feb 05 11:03:21 ucs1 dhcpd: Configuration file errors encountered -- exiting
The best solution is, to reinstall the server without the demoschool, to have a clean start.
It is possible to fix this, with some expenditure:
You have to to delete and recreate the dhcp server object in the correct OU and fix UCR dhcpd/ldap/base
udm dhcp/server list DN: cn=ucs1,cn=schein.ig,cn=dhcp,dc=schein,dc=ig server: ucs1 ucr get dhcpd/ldap/base cn=dhcp,ou=DEMOSCHOOL,dc=schein,dc=ig
- Should look like:
udm dhcp/server list DN: cn=ucs1,cn=school,cn=dhcp,ou=school,dc=schein,dc=igt server: ucs1 ucr get dhcpd/ldap/base cn=dhcp,ou=school,dc=schein,dc=ig
Already defined subnets need to be added too, and all dhcp relevant policy need to be checked.