Bug 33161 - opening of udm modules fails with traceback if "cn=default containers" is missing
opening of udm modules fails with traceback if "cn=default containers" is mis...
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UMC - Domain management (Generic)
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 3.x
Assigned To: UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 17:52 CET by Florian Best
Modified: 2016-05-27 12:01 CEST (History)
3 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): Cleanup
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2013-11-06 17:52:41 CET
When opening the computers udm module in UMC the following traceback occurs:

Execution of command 'udm/containers' has failed:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/__init__.py", line 204, in execute
    func( request )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 305, in _response
    result = _multi_response(self, request)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 432, in _response
    for res in function(self, iterator, *nones):
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/decorators.py", line 271, in _fake_func
    yield function(self, *args)
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 603, in containers
    containers += self.settings.containers( flavor )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 877, in containers
    return map( lambda x: { 'id' : x, 'label' : ldap_dn2path( x ) }, self.directory.info.get( base, [] ) )
AttributeError: 'NoneType' object has no attribute 'info'

After this, no action is possible anymore. Also reopening the computers module only shows a white blank tab.

I used the test script "/usr/sbin/import_ldif_without_listener /usr/share/ucs-test-tools/customer5000.ldif" before.
Comment 1 Alexander Kläser univentionstaff 2013-11-07 14:20:23 CET
(In reply to Florian Best from comment #0)
> ...
> I used the test script "/usr/sbin/import_ldif_without_listener
> /usr/share/ucs-test-tools/customer5000.ldif" before.

I would assume that this is the cause for the problem.
Comment 2 Dirk Wiesenthal univentionstaff 2013-11-07 14:44:08 CET
(In reply to Florian Best from comment #0)
> I used the test script "/usr/sbin/import_ldif_without_listener
> /usr/share/ucs-test-tools/customer5000.ldif" before.

You forgot to mention that before that you ran /usr/sbin/import_ldif_with_listener /usr/share/ucs-test-tools/customer5000.ldif and SIGKILLed it after an hour or two.
Comment 3 Florian Best univentionstaff 2013-11-11 09:36:43 CET
(In reply to Alexander Kläser from comment #1)
> (In reply to Florian Best from comment #0)
> > ...
> > I used the test script "/usr/sbin/import_ldif_without_listener
> > /usr/share/ucs-test-tools/customer5000.ldif" before.
> 
> I would assume that this is the cause for the problem.
No…
The cause is that no license is found.

From the udm log:
LDAP        ( ERROR   ) : Could not retrieve the location of licenses from: cn=default containers,cn=univention,dc=produkt,dc=tests.
Comment 4 Alexander Kläser univentionstaff 2013-11-11 09:45:46 CET
(In reply to Florian Best from comment #3)
> No…
> The cause is that no license is found.
> 
> From the udm log:
> LDAP        ( ERROR   ) : Could not retrieve the location of licenses from:
> cn=default containers,cn=univention,dc=produkt,dc=tests.

Is it then a problem with /usr/sbin/import_ldif_without_listener ?
Comment 5 Florian Best univentionstaff 2013-11-11 10:14:15 CET
(In reply to Alexander Kläser from comment #4)
> (In reply to Florian Best from comment #3)
> > No…
> > The cause is that no license is found.
> > 
> > From the udm log:
> > LDAP        ( ERROR   ) : Could not retrieve the location of licenses from:
> > cn=default containers,cn=univention,dc=produkt,dc=tests.
> 
> Is it then a problem with /usr/sbin/import_ldif_without_listener ?
I think this has probably nothing to do with the import script.

Somehow the object "cn=default containers,cn=univention,$ldap_base" does not exists on my machine.
Comment 6 Florian Best univentionstaff 2016-05-27 12:01:57 CEST
That code seems to be fixed. There is a check:
 954 »   »   if self.directory is None:
 955 »   »   »   return []