<div dir="ltr"><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">I encountered the same problem when I run keystone with eventlet server by using </span><i style="font-size:13.1999998092651px;line-height:19.7999992370605px">keystone-all</i><span style="font-size:13.1999998092651px;line-height:19.7999992370605px"> command.</span><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">The failure caused by func <i>load_driver</i> in <i>keystone.common.manager</i>.</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><div> try:</div><div> driver_manager = stevedore.DriverManager(namespace,</div><div> driver_name,</div><div> invoke_on_load=True,</div><div> invoke_args=args)</div><div> return driver_manager.driver</div><div> except RuntimeError:</div><div> # Ignore failure to load driver using stevedore and continue on.</div><div> pass</div><div><br></div><div>stevedore failed to load the module, and the RuntimeError's error message is:</div><div> No 'keystone.identity' driver found, looking for 'sql'</div><div>while 'keystone.identity' is the value of namespace, and 'sql' is the value of driver, boht of them are right. I also check the setup.cfg file, it contains the right lines:</div><div><br></div><div><div>keystone.identity =</div><div> ldap = keystone.identity.backends.ldap:Identity</div><div> sql = keystone.identity.backends.sql:Identity</div></div><div><br></div><div>Then I build another environment by cloning newest repo and reinstall the virtualenv. Then, the server starting successfully. <b>So, I don't know why stevedore failed.</b></div><div><b><br></b></div><div>But I indeed found there is a bug: If stevedore failed to load a driver, the backward way doesn't help:</div><div><br></div><div><div> def _load_using_import(driver_name, *args):</div><div> return importutils.import_object(driver_name, *args)</div><div><br></div><div> # For backwards-compatibility, an unregistered class reference can</div><div> # still be used.</div><div> return _load_using_import(driver_name, *args)</div></div><div><br></div><div>These code will try to import a driver_name = 'sql', and it failed.</div></div><br><div class="gmail_quote">On Sun, May 17, 2015 at 4:25 PM Chenhong Liu <<a href="mailto:liuchenhong@unitedstack.com">liuchenhong@unitedstack.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br>I encountered the same problem when I run keystone with eventlet server by using <i>keystone-all</i> command.<div><br></div><div>The failure caused by func <i>load_driver</i> in <i>keystone.common.manager</i>.</div><div><br></div><div><div> try:</div><div> driver_manager = stevedore.DriverManager(namespace,</div><div> driver_name,</div><div> invoke_on_load=True,</div><div> invoke_args=args)</div><div> return driver_manager.driver</div><div> except RuntimeError:</div><div> # Ignore failure to load driver using stevedore and continue on.</div><div> pass</div><div><br></div><div>stevedore failed to load the module, and the RuntimeError's error message is:</div><div> No 'keystone.identity' driver found, looking for 'sql'</div><div>while 'keystone.identity' is the value of namespace, and 'sql' is the value of driver, boht of them are right. I also check the setup.cfg file, it contains the right lines:</div><div><br></div><div><div>keystone.identity =</div><div> ldap = keystone.identity.backends.ldap:Identity</div><div> sql = keystone.identity.backends.sql:Identity</div></div><div><br></div><div>Then I build another environment by cloning newest repo and reinstall the virtualenv. Then, the server starting successfully. <b>So, I don't know why stevedore failed.</b></div><div><b><br></b></div><div>But I indeed found there is a bug: If stevedore failed to load a driver, the backward way doesn't help:</div><div><br></div><div><div> def _load_using_import(driver_name, *args):</div><div> return importutils.import_object(driver_name, *args)</div><div><br></div><div> # For backwards-compatibility, an unregistered class reference can</div><div> # still be used.</div><div> return _load_using_import(driver_name, *args)</div></div><div><br></div><div>These code will try to import a driver_name = 'sql', and it failed.</div></div></div><div dir="ltr"><div><div><br><div class="gmail_quote">On Sun, May 17, 2015 at 6:55 AM Scott Drennan <<a href="mailto:scottd@nuagenetworks.net" target="_blank">scottd@nuagenetworks.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Perhaps an obvious statement, but devstack master was working with stable/kilo until recently, and as of today, it isn't any more (at least for me).</div><div><br></div>The devstack commit "Use stevedore for keystone backends" on 2014-05-15 changes the way backends are set, and when I did a fresh install today I ended up with keystone.conf entries like this:<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>[assignment]</div></div><div><div>driver = sql</div></div><div>...</div><div><div>[identity]</div></div><div><div>driver = sql</div></div><div><div>...</div></div><div><div>[token]</div></div><div><div><div>driver = sql</div></div></div></blockquote><div><div><br></div><div>rather than fully specified module names (e.g. "driver = keystone.identity.backends.sql.Identity")</div><div><br></div><div>This caused keystone to fail, with errors in /var/log/apache2/keystone.log like this:</div><div><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div>2015-05-16 21:16:25.786955 mod_wsgi (pid=9296): Exception occurred processing WSGI script '/var/www/keystone/main'.</div></div></div><div><div><div>2015-05-16 21:16:25.787114 Traceback (most recent call last):</div></div></div><div><div><div>2015-05-16 21:16:25.787189 File "/var/www/keystone/main", line 25, in <module></div></div></div><div><div><div>2015-05-16 21:16:25.787409 application = wsgi_server.initialize_application(name)</div></div></div><div><div><div>2015-05-16 21:16:25.787437 File "/opt/stack/keystone/keystone/server/wsgi.py", line 51, in initialize_application</div></div></div><div><div><div>2015-05-16 21:16:25.787600 startup_application_fn=loadapp)</div></div></div><div><div><div>2015-05-16 21:16:25.787625 File "/opt/stack/keystone/keystone/server/common.py", line 41, in setup_backends</div></div></div><div><div><div>2015-05-16 21:16:25.787769 drivers = backends.load_backends()</div></div></div><div><div><div>2015-05-16 21:16:25.787795 File "/opt/stack/keystone/keystone/backends.py", line 39, in load_backends</div></div></div><div><div><div>2015-05-16 21:16:25.787946 _IDENTITY_API = identity.Manager()</div></div></div><div><div><div>2015-05-16 21:16:25.789345 File "/opt/stack/keystone/keystone/common/dependency.py", line 131, in __wrapped_init__</div></div></div><div><div><div>2015-05-16 21:16:25.789519 init(self, *args, **kwargs)</div></div></div><div><div><div>2015-05-16 21:16:25.789544 File "/opt/stack/keystone/keystone/common/dependency.py", line 193, in wrapper</div></div></div><div><div><div>2015-05-16 21:16:25.789570 self.__wrapped_init__(*args, **kwargs)</div></div></div><div><div><div>2015-05-16 21:16:25.789584 File "/opt/stack/keystone/keystone/identity/core.py", line 412, in __init__</div></div></div><div><div><div>2015-05-16 21:16:25.790098 super(Manager, self).__init__(CONF.identity.driver)</div></div></div><div><div><div>2015-05-16 21:16:25.790124 File "/opt/stack/keystone/keystone/common/manager.py", line 70, in __init__</div></div></div><div><div><div>2015-05-16 21:16:25.790203 self.driver = importutils.import_object(driver_name)</div></div></div><div><div><div>2015-05-16 21:16:25.790226 File "/usr/local/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 38, in import_object</div></div></div><div><div><div>2015-05-16 21:16:25.790312 return import_class(import_str)(*args, **kwargs)</div></div></div><div><div><div>2015-05-16 21:16:25.790335 File "/usr/local/lib/python2.7/dist-packages/oslo_utils/importutils.py", line 27, in import_class</div></div></div><div><div><div>2015-05-16 21:16:25.790358 __import__(mod_str)</div></div></div><div><div><div>2015-05-16 21:16:25.790384 ValueError: Empty module name</div></div></div></blockquote><div><div><br></div><div>After much head-scratching, since I'm not that familiar with keystone, I figured out what was going on, corrected keystone.conf, and then went back to devstack:stable/kilo, which behaves normally. I don't think there's an issue here, but wanted to share in case someone else hits the same problem.</div><div><br></div><div><div>cheers,</div><div>Scott</div></div></div></div>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div></div></div></blockquote></div></div>