Bug 32528 - ldap.sh: ucs_removeServiceFromHost: udm remove --ignore_exists
ldap.sh: ucs_removeServiceFromHost: udm remove --ignore_exists
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: univention-lib
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.x
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-09 12:20 CEST by Philipp Hahn
Modified: 2017-08-08 07:11 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 Philipp Hahn univentionstaff 2013-09-09 12:20:38 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".)
Comment 1 Stefan Gohmann univentionstaff 2013-11-01 21:54:36 CET
For the target milestone only --ignore_exists should be removed.
Comment 2 Stefan Gohmann univentionstaff 2017-06-16 20:38:15 CEST
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.
Comment 3 Stefan Gohmann univentionstaff 2017-08-08 07:11:22 CEST
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.