Bug 4817 - udm-cli --set and --append cause unexpected behavior
udm-cli --set and --append cause unexpected behavior
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 4.1
Other Linux
: P2 normal (vote)
: ---
Assigned To: UMC maintainers
:
: 28064 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-05 09:30 CET by Arne Brix
Modified: 2019-02-27 18:05 CET (History)
4 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): Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arne Brix univentionstaff 2006-01-05 09:30:21 CET
Will man fuer ein multivalue attribut wirklich mehrere Werte eintragen, so muss 
man dies nur mit append machen. Eine intuitive Herangehensweise wäre, den 
ersten wert mit set zu setzen, und die darauf folgenden mit append. Hierbei 
werden jedoch die mit append gesetzten werte ohne Warnung ignoriert.
Comment 1 Janis Meybohm univentionstaff 2010-04-27 09:57:47 CEST
Ticket: 2010042710000397

Ein Kunde hatte bei einer solchen Kombination erwartet dass der momentan gesetzte Wert geändert und ein zweiter hinzugefügt wird. In der Tat wird der vorhandene Wert überschrieben, der zweite aber nicht hinzugefügt:

root@don:~# udm computers/windows list

DN: cn=wurst,cn=computers,dc=pate,dc=orig
ARG: None
  groups: cn=Windows Hosts,cn=groups,dc=pate,dc=orig
  ntCompatibility: None
  domain: None
  network: cn=default,cn=networks,dc=pate,dc=orig
  inventoryNumber: None
  ip: 10.200.6.4
  description: None
  dnsEntryZoneReverse: zoneName=6.200.10.in-addr.arpa,cn=dns,dc=pate,dc=orig 10.200.6.4
  mac: None
  dhcpEntryZone: dc=pate,dc=orig 10.200.6.30
  machineAccountGroup: cn=Windows Hosts,cn=groups,dc=pate,dc=orig
  dnsEntryZoneForward: zoneName=pate.orig,cn=dns,dc=pate,dc=orig 10.200.6.4
  reinstall: None
  name: wurst

root@don:~# udm computers/windows modify --dn cn=wurst,cn=computers,dc=pate,dc=orig --set ip=10.200.6.5 --append ip=10.200.6.56
Object modified: cn=wurst,cn=computers,dc=pate,dc=orig

root@don:~# udm computers/windows list
DN: cn=wurst,cn=computers,dc=pate,dc=orig
ARG: None
  groups: cn=Windows Hosts,cn=groups,dc=pate,dc=orig
  ntCompatibility: None
  domain: None
  network: cn=default,cn=networks,dc=pate,dc=orig
  inventoryNumber: None
  ip: 10.200.6.5
  description: None
  dnsEntryZoneReverse: zoneName=6.200.10.in-addr.arpa,cn=dns,dc=pate,dc=orig 10.200.6.5
  mac: None
  dhcpEntryZone: dc=pate,dc=orig 10.200.6.30
  dhcpEntryZone: dc=pate,dc=orig 10.200.6.5
  machineAccountGroup: cn=Windows Hosts,cn=groups,dc=pate,dc=orig
  dnsEntryZoneForward: zoneName=pate.orig,cn=dns,dc=pate,dc=orig 10.200.6.5
  reinstall: None
  name: wurst

Sind mehrere IPs gesetzt, entfernt --set alle und fügt nur die neue hinzu.
Comment 2 Janis Meybohm univentionstaff 2010-04-27 10:13:51 CEST
Mit --remove ip=<AlteIP> --append ip=<NeueIP> --append ip=<NeueIP> funktioniert das "tauschen"  und Hinzufügen einer neuen IP in einem Aufruf. Deutlicher Nachteil ist natürlich dass die alte IP bekannt sein muss.
Comment 3 Alexander Kläser univentionstaff 2011-12-15 14:28:47 CET
Das Verhalten ist auch unter 3.0 noch das gleiche und weiterhin verwirrend.
Comment 4 Alexander Kläser univentionstaff 2012-07-25 14:08:59 CEST
*** Bug 28064 has been marked as a duplicate of this bug. ***
Comment 5 Alexander Kläser univentionstaff 2012-07-25 14:12:02 CEST
Wird --set für die Eigenschaft "groups" von Benutzern verwendet, gibt es eine Traceback. Hilfreich könnte eine entsprechende Fehlermeldung sein, wenn --set für einen Listen-Wert verwendet wird. Oder man lässt mehrere --set-Eingabe für ein Attribut zu (dabei würden beim Modifizieren alte Werte überschrieben werden).
Comment 6 Lukas Walter univentionstaff 2013-07-23 15:44:59 CEST
Im Rahmen der Entwicklung von unit tests für das settings/extended_attributes Modul ist aufgefallen, dass dieses Problem nach wie vor aktuell ist.

=======
udm computers/windows create --set name="some_windows" --set mac="11:11:11:11:11:11" --append mac="22:22:22:22:22:22"
Object created: cn=some_windows,dc=ucs,dc=dev
=======
# some_windows, ucs.dev
dn: cn=some_windows,dc=ucs,dc=dev
univentionServerRole: windows_client
displayName: some_windows
cn: some_windows
krb5PrincipalName: host/some_windows.ucs.dev@UCS.DEV
macAddress: 11:11:11:11:11:11
objectClass: top
objectClass: person
objectClass: univentionHost
objectClass: univentionWindows
objectClass: krb5Principal
objectClass: krb5KDCEntry
objectClass: posixAccount
objectClass: shadowAccount
objectClass: sambaSamAccount
objectClass: univentionObject
loginShell: /bin/false
univentionObjectType: computers/windows
uidNumber: 4599
krb5KDCFlags: 126
sambaAcctFlags: [W          ]
krb5MaxRenew: 604800
krb5KeyVersionNumber: 1
sn: some_windows
homeDirectory: /dev/null
sambaSID: S-1-5-21-883014607-362369245-1255448676-10198
krb5MaxLife: 86400
uid: some_windows$
gidNumber: 1005
sambaPrimaryGroupSID: S-1-5-21-883014607-362369245-1255448676-11011
=====
Comment 7 Stefan Gohmann univentionstaff 2019-01-03 07:23:51 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.