#104 ipsilon-server-install fails when ipa is enabled, nss name conflict, plugins need to be loaded into their own namespace
Closed: Fixed None Opened 9 years ago by jdennis.

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.


I ran into this with ticket 47 and had a patch for review with a patch for the ticket as well but it appears only the second patch got pushed upstream.

See my ticket_104 branch for a fix

owner: => rcritten
patch_available: 0 => 1
status: new => accepted

This has been fixed in commit 38d9a4c

resolution: => fixed
status: accepted => closed

Fields changed

rhbz: => 0

Metadata Update from @nkinder:
- Issue assigned to rcritten
- Issue set to the milestone: 1.0 m4

7 years ago

Login to comment on this ticket.

Metadata