Bug 22139 - Read-Only Attribute FQDN
Read-Only Attribute FQDN
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Computers
UCS 2.4
Other Linux
: P5 enhancement (vote)
: UCS 2.4-3
Assigned To: Andreas Büsching
Alexander Kläser
:
: 22693 (view as bug list)
Depends on: 21493 22693
Blocks: 22142 34327
  Show dependency treegraph
 
Reported: 2011-04-07 13:53 CEST by Stefan Gohmann
Modified: 2014-03-12 17:07 CET (History)
5 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 Stefan Gohmann univentionstaff 2011-04-07 13:53:08 CEST
Es ist derzeit nicht möglich nach dem neuen Attribut zu suchen:

root@dvsmaster:~# udm computers/windows list --filter fqdn='first-vorla.dvs10.local'
fqdn=first-vorla.dvs10.local
root@dvsmaster:~# udm computers/windows list --filter cn='first-vorla' | grep fqdn
  fqdn: first-vorla.dvs10.local

+++ This bug was initially created as a clone of Bug #21493 +++

Es sollte am Rechner-Objekt ein Attribut geben, dass den FQDN des Rechners. Das
ist in mehreren Fällen hilfreich.
Comment 1 Stefan Gohmann univentionstaff 2011-04-07 13:53:40 CEST
Bitte auch direkt für UCS DVS bereitstellen.
Comment 2 Andreas Büsching univentionstaff 2011-04-07 16:09:01 CEST
Es kann jetzt nach dem Attribut gesucht werden. Einfache und komplexere Filter müssen funktionieren:

udm computers/windows list --filter fqdn=wins1.uvmm.test

oder auch

udm computers/windows list --filter '(&(fqdn=wins1.uvmm.test)(ip=192.168.0.190))'

ChangeLog-Eintrag wurde hinzugefügt
Comment 3 Andreas Büsching univentionstaff 2011-04-08 09:31:08 CEST
In UMC wird dem Filter String None übergeben. Das wird jetzt vorher geprüft.
Comment 4 Alexander Kläser univentionstaff 2011-08-17 10:44:04 CEST
QA: Soweit OK, es tritt derzeit noch ein Traceback auf, wenn bspw. nach '*' im Filter gesucht wird, da der String nach '.' aufgesplittet wird. Sobald ein '.' im Suchstring enthalten ist, ist das Verhalten wie erwartet:

====================
root@qamaster:~# udm computers/mobileclient list --filter fqdn="mobile2.*" | grep DN
DN: cn=mobile2,cn=computers,dc=univention,dc=qa

root@qamaster:~# udm computers/mobileclient list --filter fqdn="*"
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/python2.4/site-packages/univention/admincli/admin.py", line 1055, in doit
    for object in univention.admin.modules.lookup(module, co, lo, scope='sub', superordinate=superordinate, base=position.getDn(), filter=filter):
  File "/usr/lib/python2.4/site-packages/univention/admin/modules.py", line 740, in lookup
    tmpres=module.lookup(co, lo, filter, base=base, superordinate=superordinate, scope=scope, unique=unique, required=required, timeout=timeout, sizelimit=sizelimit)
  File "/usr/lib/python2.4/site-packages/univention/admin/handlers/computers/mobileclient.py", line 604, in lookup
    filter_s = univention.admin.filter.replace_fqdn_filter( filter_s )
  File "/usr/lib/python2.4/site-packages/univention/admin/filter.py", line 222, in replace_fqdn_filter
    host, domain = value.split( '.', 1 )
ValueError: need more than 1 value to unpack
====================

→ REOPENED
Comment 5 Alexander Kläser univentionstaff 2011-08-17 10:45:04 CEST
QA: Changelog-Eintrag vorhanden.
Comment 6 Andreas Büsching univentionstaff 2011-08-17 11:53:16 CEST
(In reply to comment #4)
> QA: Soweit OK, es tritt derzeit noch ein Traceback auf, wenn bspw. nach '*' im
> Filter gesucht wird, da der String nach '.' aufgesplittet wird. Sobald ein '.'
> im Suchstring enthalten ist, ist das Verhalten wie erwartet:

Es funktionieren jetzt auch Suchfilter ohne Punkt.

In dem Fall wird der Suchfilter im Hostname und der Domäne gesucht. Es muss aber nur in einem von beiden existieren.

Eine neue Version baut.
Comment 7 Alexander Kläser univentionstaff 2011-08-18 10:03:20 CEST
QA: OK, das Verhalten ist jetzt wie erwartet:

====================
root@qamaster:~# function udm_fqdn { udm computers/mobileclient list --filter fqdn="$1" | grep DN ; } 
root@qamaster:~# udm_fqdn "*"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
root@qamaster:~# udm_fqdn "*.*"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
root@qamaster:~# udm_fqdn "*.*vent*"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
root@qamaster:~# udm_fqdn "*.*ven*.qa"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
root@qamaster:~# udm_fqdn "*.*ven*.qa"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
root@qamaster:~# udm_fqdn "*ob*.*ven*.qa"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
root@qamaster:~# udm_fqdn "mob*.*vent*"
DN: cn=mobile1,cn=computers,dc=univention,dc=qa
DN: cn=mobile2,cn=computers,dc=univention,dc=qa
====================
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2011-09-14 10:56:15 CEST
UCS 2.4-3 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer
neueren Version von UCS erneut auftreten, so sollte der Bug dupliziert werden:
"Clone This Bug".
Comment 9 Philipp Hahn univentionstaff 2012-12-03 11:41:29 CET
*** Bug 22693 has been marked as a duplicate of this bug. ***