Bug 43624 - App Center's UDM utils still use .exists() when noObject is raised before
App Center's UDM utils still use .exists() when noObject is raised before
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Dirk Wiesenthal
Florian Best
: interim-2
Depends on: 38110
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-23 13:13 CET by Dirk Wiesenthal
Modified: 2017-04-04 18:30 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Development Internal
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): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2017-02-23 13:13:45 CET
Remove those lines with .exists() and rely solely on except noObject.

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

2015030721000058

# udm groups/group modify --dn "cn=notexistingobject,$ldap_base" --policy-reference="cn=default-umc-all,cn=UMC,cn=policies,$ldap_base"
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 222, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 393, in doit
    out=_doit(arglist)
  File "/usr/lib/pymodules/python2.7/univention/admincli/admin.py", line 1042, in _doit
    if 'univentionPolicyReference' not in lo.get(dn,['objectClass'])['objectClass']:
KeyError: 'objectClass'


# udm users/user modify --dn "cn=notexistingobject,$ldap_base" --policy-reference="cn=default-umc-all,cn=UMC,cn=policies,$ldap_base"
Value is required: The property Primary group is required

# udm container/dc modify --dn "dc=notexistingobject,$ldap_base" --policy-reference="cn=default-umc-all,cn=UMC,cn=policies,$ldap_base"
No such object: No such object


Please also see bug38109
Comment 1 Dirk Wiesenthal univentionstaff 2017-02-23 15:19:05 CET
Fixed in r77053 (with an unfortunate SVN message)
Comment 2 Florian Best univentionstaff 2017-02-23 15:24:44 CET
This seems not enough:
ApplicationLDAPObject._reload() is also affected.
Comment 3 Dirk Wiesenthal univentionstaff 2017-02-23 16:33:03 CET
Fixed in
  univention-appcenter 6.0.1-38A~4.2.0.201702231620
Comment 4 Florian Best univentionstaff 2017-02-24 13:11:16 CET
LGTM
Comment 5 Stefan Gohmann univentionstaff 2017-04-04 18:30:08 CEST
UCS 4.2 has been released:
 https://docs.software-univention.de/release-notes-4.2-0-en.html
 https://docs.software-univention.de/release-notes-4.2-0-de.html

If this error occurs again, please use "Clone This Bug".