Bug 43286 - Fix all errors like "Type or value exists: value #1 provided more than once"
Fix all errors like "Type or value exists: value #1 provided more than once"
Product: UCS
Classification: Unclassified
Component: UDM (Generic)
UCS 4.4
Other Linux
: P3 normal with 8 votes (vote)
: ---
Assigned To: UMC maintainers
: 12964 41072 (view as bug list)
Depends on: 43247
  Show dependency treegraph
Reported: 2017-01-04 14:05 CET by Florian Best
Modified: 2019-12-17 09:42 CET (History)
8 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 3: Will affect average number of installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:
best: Patch_Available+

patch (8.06 KB, patch)
2017-01-04 16:43 CET, Florian Best
Details | Diff
patch (12.89 KB, patch)
2017-01-04 17:27 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2017-01-04 14:05:04 CET
In Bug #43247 it was fixed that groups/group detects different cases when adding / setting / modifying the group members.

The UDM-CLI server implements a different logic for --remove so that the logic of groups/group is never reached.

# eval "$(ucr shell)"
# udm computers/windows create --set name=mm187n3mhs
Object created: cn=mm187n3mhs,dc=AutoTest091,dc=local
# udm groups/group create --position "cn=groups,$ldap_base" --set name=i5ilw1abiq --set hosts="cn=mm187n3mhs,$ldap_base"
Object created: cn=i5ilw1abiq,cn=groups,dc=AutoTest091,dc=local
# udm groups/group modify --dn "cn=i5ilw1abiq,cn=groups,$ldap_base" --remove hosts="CN=mm187n3mhs,$ldap_base"
WARNING: cannot remove CN=mm187n3mhs,dc=AutoTest091,dc=local from hosts, value does not exist
No modification: cn=i5ilw1abiq,cn=groups,dc=AutoTest091,dc=local

+++ This bug was initially created as a clone of Bug #43247 +++
Comment 1 Florian Best univentionstaff 2017-01-04 16:43:44 CET
Created attachment 8330 [details]

The syntax class of the groups/group properties hosts/nestedGroup/users has been adapted to have a comparision function.
This function is now evaluated by extending the API of simpleLDAP to include a method remove_value(). The logic from admincli has therefore been moved in a generic way into simpleLDAP. The same should be done for e.g. "append_value()".
Comment 2 Florian Best univentionstaff 2017-01-04 17:27:03 CET
Created attachment 8331 [details]

Updated patch, which also implements the same logic for --append.
We can also replace/(revert some of) the manual adjustments done in groups/group.py (Bug #43247) when this patch is applied.
Comment 3 Florian Best univentionstaff 2017-06-29 19:13:17 CEST
*** Bug 41072 has been marked as a duplicate of this bug. ***
Comment 4 Florian Best univentionstaff 2017-07-04 13:03:28 CEST
*** Bug 12964 has been marked as a duplicate of this bug. ***
Comment 5 Stefan Gohmann univentionstaff 2019-01-03 07:22:48 CET
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.