Univention Bugzilla – Bug 32528
ldap.sh: ucs_removeServiceFromHost: udm remove --ignore_exists
Last modified: 2017-08-08 07:11:22 CEST
univention-lib/shell/ldap.sh:202 univention-directory-manager settings/service remove "$@" --ignore_exists 1. '--ignore_exists' is not a valid option for _remove_. 2. There is no "--ignore_already_removed" equivalent 3. Any shell script using this function can't decide (based on the exit code), if there was a temporary problem with the LDAP connection or in authentication, or if there's a permanent error like "wrong LDAP base" or "object/attribute already removed". 4. The function also removes the service name from the list of allowed services, if the last user is removed. This is neither reflected in the name of the function nor in the comment. 5. The comment contains a joke: # ... This can be _easily_ used ... # try do do proper error handling and you'll feel the pain. (If would help, if the function would be named and implemented to "reach a state" instead of trying a "transition", that is "transfer the object from any state into a state, where the service attribute is removed" instead of "try to remove that attribute and return an error, your're neither interested in, can't handle correctly, nor can distinguish".)
For the target milestone only --ignore_exists should be removed.
This issue has been filed against UCS 3. UCS 3 is out of the normal maintenance and many UCS components have vastly changed in UCS 4. If this issue is still valid, please change the version to a newer UCS version otherwise this issue will be automatically closed in the next weeks.
This issue has been filed against UCS 3.2. UCS 3.2 is out of maintenance and many UCS components have vastly changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen this issue. In this case please provide detailed information on how this issue is affecting you.