Univention Bugzilla – Bug 34414
Confusing (mixed) error message "E: Option The property Service Name is required is not valid"
Last modified: 2019-01-03 07:19:43 CET
Created attachment 5841 [details] check parameters in ldap.sh for empty values. Accidentally caused by: SERVICE='' ucs_addServiceToLocalhost "$SERVICE" "$@" || die "Failed to register service '$SERVICE' on host in LDAP." Seems to be a mix of two error messages: $ git grep -n "The property.*is required" -- \*.py management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py:215: raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description management/univention-directory-manager-modules/modules/univention/admincli/admin.py:798: out.append('E: Option %s is not valid' %err) Without digging further into UDM, our shell libraries should probably converted to using '${var:?error message}', which not only checks if the parameter is supplied, but also that is non-empty. This is also supported by dash. Notice the following change in behavior: on errors the shell will immediately "exit 2" and not "return 2", which would terminate the script only when combined with "set -e".
This issue has been filled against UCS 4.1. The maintenance with bug and security fixes for UCS 4.1 has ended on 5st of April 2018. Customers still on UCS 4.1 are encouraged to update to UCS 4.3. 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.