Bug 31571 - Deleting and reimporting of OU fails
Deleting and reimporting of OU fails
Status: RESOLVED WONTFIX
Product: UCS@school
Classification: Unclassified
Component: Import scripts
UCS@school 3.1
Other Linux
: P5 normal (vote)
: UCS@school 3.x
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-29 16:25 CEST by Felix Herrmann
Modified: 2019-02-05 21:26 CET (History)
1 user (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 Felix Herrmann univentionstaff 2013-05-29 16:25:12 CEST
After deleting an OU and reimporting it via import_networks some existing objects of the default container were not deleted automatically to make the creation of the new objects possible. Probably a udm bug.

The import became possible only after deleting the objects using ldapmodify (see the listing of the traceback and the contents of changes.ldif below).

eval $(ucr shell)
ldapmodify -D uid=Administrator,cn=users,$ldap_base -W -f changes.ldif


/usr/share/ucs-school-import/scripts/import_networks 43g01.network
infile is  : 43g01.network
verify ou for school nr 43G01
need to create container cn=computers,ou=43G01,ou=43,dc=schule,dc=testdomain,dc=local
Traceback (most recent call last):
  File "/usr/share/ucs-school-import/scripts/import_networks", line 2956, in <module>
    import_networks()
  File "/usr/share/ucs-school-import/scripts/import_networks", line 1931, in import_networks
    success, dn = create_network( schoolNr, network, iprange=iprange, defaultrouter=defaultrouter, nameserver=nameserver, netbiosserver=netbiosserver )
  File "/usr/share/ucs-school-import/scripts/import_networks", line 1641, in create_network
    verify_school_ou(schoolNr, co, lo, baseDN)
  File "/usr/share/ucs-school-import/scripts/import_networks", line 598, in verify_school_ou
    verify_container('%s,%s'%(dn,ou_base),cn_module, co, lo, superordinate, baseDN, path=path[1:])
  File "/usr/share/ucs-school-import/scripts/import_networks", line 1002, in verify_container
    exists, dn = create_object(object)
  File "/usr/share/ucs-school-import/scripts/import_networks", line 919, in create_object
    dn=o.create()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 332, in create
    return self._create()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 715, in _create
    raise e
univention.admin.uexceptions.ldapError: Type or value exists: modify/add: univentionComputersObject: value #0 already exist


changes.ldif:
dn: cn=default containers,cn=univention,dc=schule,dc=testdomain,dc=local
changetype: modify
delete: univentionComputersObject
univentionComputersObject: cn=computers,ou=43g01,ou=43,dc=schule,dc=testdomain,dc=local

dn: cn=default containers,cn=univention,dc=schule,dc=testdomain,dc=local
changetype: modify
delete: univentionPolicyObject
univentionPolicyObject: cn=policies,ou=43g01,ou=43,dc=schule,dc=testdomain,dc=local

dn: cn=default containers,cn=univention,dc=schule,dc=testdomain,dc=local
changetype: modify
delete: univentionSharesObject
univentionSharesObject: cn=shares,ou=43g01,ou=43,dc=schule,dc=testdomain,dc=local

dn: cn=default containers,cn=univention,dc=schule,dc=testdomain,dc=local
changetype: modify
delete: univentionGroupsObject
univentionGroupsObject: cn=groups,ou=43g01,ou=43,dc=schule,dc=testdomain,dc=local

dn: cn=default containers,cn=univention,dc=schule,dc=testdomain,dc=local
changetype: modify
delete: univentionUsersObject
univentionUsersObject: cn=users,ou=43g01,ou=43,dc=schule,dc=testdomain,dc=local
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2019-02-05 21:26:48 CET
This issue has been filled against UCS@school 3.2. The maintenance with
bug and security fixes for UCS@school 3.2 has ended on Dec 31, 2016.

Customers still on UCS 3.x are encouraged to update to UCS 4.3 (or later). 
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.