Missing clients aren't handled gracefully

Bug #1598765 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Unassigned

Bug Description

If you're missing a client you get a bunch of errors like this on heat-engine start:

2016-07-04 10:27:52.022 ERROR stevedore.extension [-] Could not load 'senlin.policy_type': No module named senlinclient
2016-07-04 10:27:52.022 ERROR stevedore.extension [-] No module named senlinclient
2016-07-04 10:27:52.022 TRACE stevedore.extension Traceback (most recent call last):
2016-07-04 10:27:52.022 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 163, in _load_plugins
2016-07-04 10:27:52.022 TRACE stevedore.extension verify_requirements,
2016-07-04 10:27:52.022 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/stevedore/extension.py", line 184, in _load_one_plugin
2016-07-04 10:27:52.022 TRACE stevedore.extension plugin = ep.resolve()
2016-07-04 10:27:52.022 TRACE stevedore.extension File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
2016-07-04 10:27:52.022 TRACE stevedore.extension module = __import__(self.module_name, fromlist=['__name__'], level=0)
2016-07-04 10:27:52.022 TRACE stevedore.extension File "/opt/stack/heat/heat/engine/clients/os/senlin.py", line 19, in <module>
2016-07-04 10:27:52.022 TRACE stevedore.extension from senlinclient import client
2016-07-04 10:27:52.022 TRACE stevedore.extension ImportError: No module named senlinclient
2016-07-04 10:27:52.022 TRACE stevedore.extension

This is expected, but it's confusing to those unfamiliar with heat when debugging, because it looks like a bad error, vs effectively a warning specific to some subset of plugins. Heat actually starts and runs fine (except for templates that use these clients via related resources).

We also go ahead and load plugins which can never work, despite the above error:

2016-07-04 10:27:52.201 INFO heat.engine.environment [-] Registered: [Plugin](User:False) OS::Senlin::Node -> <class 'heat.engine.resources.openstack.senlin.node.Node'>

It would be better if we could handle this gracefully, e.g

- Output a warning if an expected client is missing
- Do not register a plugin if we lack the related client (again with a warning)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.