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...
Status: CLOSED FIXED
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:
Blocks:
  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:


Attachments

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
Ticket#2015070221000354

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
fi



Configure 25univention-dhcp.inst Thu Jul  2 11:21:01 CEST 2015
++ ldapsearch-wrapper
++ egrep -c 'objectClasses: \( [0-9.]+ NAME
'\''(dhcpTSigKey|dhcpFailOverPeer)'\'''
+++ 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 10.9.7.254 ']'
+ 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=10.9.7.254
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
 2015-07-09-univention-dhcp.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
<http://errata.univention.de/ucs/4.0/271.html>