#517 Recovered: ipsilon-server-install fails when ipa is enabled, nss name conflict, plugins need to be loaded into their own namespace
Closed: Fixed by t0xic0der. Opened by t0xic0der.

If you enable ipa in ipsilon-server-install and there is no pre-existing keytab the install will abort with the following backtrace:

[2015-04-08 15:56:53,642] No module named nss
Traceback (most recent call last):
  File "/usr/sbin/ipsilon-server-install", line 407, in <module>
    install(fplugins, opts)
  File "/usr/sbin/ipsilon-server-install", line 180, in install
    if plugin.configure_server(args) == False:
  File "/usr/lib/python2.7/site-packages/ipsilon/helpers/ipa.py", line 197, in configure_server
    self.get_keytab(opts)
  File "/usr/lib/python2.7/site-packages/ipsilon/helpers/ipa.py", line 122, in get_keytab
    api.finalize()
  File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 708, in finalize
    self.__do_if_not_done('load_plugins')
  File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 482, in __do_if_not_done
    getattr(self, name)()
  File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 645, in load_plugins
    self.import_plugins('ipalib')
  File "/usr/lib/python2.7/site-packages/ipalib/plugable.py", line 689, in import_plugins
    __import__(fullname)
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/cert.py", line 27, in <module>
    from ipalib import pkcs10
  File "/usr/lib/python2.7/site-packages/ipalib/pkcs10.py", line 35, in <module>
    import nss.nss as nss
ImportError: No module named nss

This is due to nss info plugin being loaded. At the moment the pkcs10.py module is being loaded sys.modules contains this entry:

'nss': <module 'nss' from '/usr/lib/python2.7/site-packages/ipsilon/info/nss.pyc'>

There is obviously a module namespace conflict. Either the plugins need to be loaded into their own namesapce or the module name needs to be fully qualified. It's not permissible to shadow top level names.


This issue ticket was originally removed from the tracker as it clashed with the pull request.
See upstream ticket for migration details.


Metadata Update from @t0xic0der:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Metadata