Bug 38822 - 25univention-dhcp.inst fails if there is not cn=default-settings DHCP routing policy
25univention-dhcp.inst fails if there is not cn=default-settings DHCP routing...
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Philipp Hahn
Janek Walkenhorst
Depends on:
  Show dependency treegraph
Reported: 2015-07-02 16:01 CEST by Janis Meybohm
Modified: 2015-08-06 17:48 CEST (History)
2 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:


Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2015-07-02 16:01:56 CEST

If there is no DHCP routing policy called cn=default-settings and UCR gateway is set, 25univention-dhcp.inst dies at:

old=$(univention-directory-manager policies/dhcp_routing list "$@" --filter cn=default-settings | sed -ne 's|.*routers: ||p')
if [ -z "$old" -a -n "$gateway" ]; then
        univention-directory-manager policies/dhcp_routing modify "$@" --ignore_exists \
                --dn "cn=default-settings,cn=routing,cn=dhcp,cn=policies,$ldap_base" \
                --set name=default-settings \
                --set routers="$gateway" || die

Configure 25univention-dhcp.inst Thu Jul  2 11:21:01 CEST 2015
++ ldapsearch-wrapper
++ egrep -c 'objectClasses: \( [0-9.]+ NAME
+++ cat /etc/machine.secret
++ ldapsearch -xLLL -D
cn=dcgsstv,cn=dc,cn=server,cn=computers,ou=gsst,dc=foo,dc=local -w foo -b cn=Subschema -s base objectClasses
+ '[' 2 -ne 2 ']'
++ univention-directory-manager policies/dhcp_routing list --binddn uid=Administrator,cn=users,dc=gfoo,dc=local --bindpwd foo --filter cn=default-settings
++ sed -ne 's|.*routers: ||p'
+ old=
+ '[' -z '' -a -n ']'
+ univention-directory-manager policies/dhcp_routing modify --binddn uid=Administrator,cn=users,dc=foo,dc=local --bindpwd foo --ignore_exists --dn cn=default-settings,cn=routing,cn=dhcp,cn=policies,dc=foo,dc=local
--set name=default-settings --set routers=
E: object not found
+ die
+ exit 3
Comment 1 Philipp Hahn univentionstaff 2015-07-08 11:43:08 CEST
r61862 | Bug #38584,Bug #37614,Bug #38822: DHCP policies
 The policy is only modified if it still exists and it is the first DHCP (Shared) Sub-net

Package: univention-dhcp
Version: 9.0.0-3.521.201507081110
Branch: ucs_4.0-0
Scope: errata4.0-2

r61863 | Bug #38584,Bug #37614,Bug #38822: DHCP policies YAML
Comment 2 Janek Walkenhorst univentionstaff 2015-08-04 20:16:48 CEST
Code review: OK
Advisory: OK
Tests: OK
Comment 3 Janek Walkenhorst univentionstaff 2015-08-06 17:48:07 CEST