OS: Ubuntu 14.04.2 LTS
Ironic version: master branch, commit: 6e714ffb6c84913ed53e647f7637da3a936ab1fa
Upon attempting to enable the UCS drivers in Bifrost, I encountered two issues:
1) The documented UcsSdk version fails to install from pip. Although, a slightly newer revision was released a few days ago, so I attempted 0.8.1.7 which does successfully install.
Downloading UcsSdk-0.8.1.6.tar.gz (2.7MB)
100% |████████████████████████████████| 2.7MB 276kB/s
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/UcsSdk.egg-info
writing pip-egg-info/UcsSdk.egg-info/PKG-INFO
writing namespace_packages to pip-egg-info/UcsSdk.egg-info/namespace_packages.txt
writing top-level names to pip-egg-info/UcsSdk.egg-info/top_level.txt
writing dependency_links to pip-egg-info/UcsSdk.egg-info/dependency_links.txt
writing manifest file 'pip-egg-info/UcsSdk.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
error: Namespace package problem: UcsSdk is a namespace package, but its
__init__.py does not call declare_namespace()! Please fix it.
(See the setuptools manual under "Namespace Packages" for details.)
"
2) Upon adding the agent_ucs driver to the enabled drivers line in the ironic.conf and restarting the conductor service, the logs below were observed in the conductor log. The root cause appears to be rooted in a file in the initial commit of the SDK. https://github.com/CiscoUcs/UcsPythonSDK/blob/master/src/UcsSdk/Constants.py#L1596
2015-06-12 16:50:06.619 32152 DEBUG oslo_concurrency.lockutils [req-7733f226-b859-49ea-b35f-af1bcc272a77 admin - - - -] Lock "extension_manager" released by "_init_extension_manager" :: held 0.034s inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:456
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line 115, in wait
listener.cb(fileno)
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
result = function(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ironic/openstack/common/service.py", line 495, in run_service
service.start()
File "/usr/local/lib/python2.7/dist-packages/ironic/common/service.py", line 75, in start
self.manager.init_host()
File "/usr/local/lib/python2.7/dist-packages/ironic/conductor/manager.py", line 247, in init_host
self._driver_factory = driver_factory.DriverFactory()
File "/usr/local/lib/python2.7/dist-packages/ironic/common/driver_factory.py", line 86, in __init__
DriverFactory._init_extension_manager()
File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 445, in inner
return f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/ironic/common/driver_factory.py", line 126, in _init_extension_manager
on_load_failure_callback=_catch_driver_not_found))
File "/usr/local/lib/python2.7/dist-packages/stevedore/dispatch.py", line 155, in __init__
verify_requirements=verify_requirements,
File "/usr/local/lib/python2.7/dist-packages/stevedore/enabled.py", line 59, in __init__
verify_requirements=verify_requirements,
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 92, in __init__
verify_requirements)
File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 170, in _load_plugins
self._on_load_failure_callback(self, ep, err)
File "/usr/local/lib/python2.7/dist-packages/ironic/common/driver_factory.py", line 115, in _catch_driver_not_found
raise exception.DriverLoadError(driver=ep.name, reason=exc)
DriverLoadError: Driver agent_ucs could not be loaded. Reason: name 'YesOrNo' is not defined.
Removing descriptor: 3
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup [-] Driver agent_ucs could not be loaded. Reason: name 'YesOrNo' is not defined.
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup Traceback (most recent call last):
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/openstack/common/threadgroup.py", line 146, in wait
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup x.wait()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/openstack/common/threadgroup.py", line 48, in wait
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup return self.thread.wait()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 175, in wait
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup return self._exit_event.wait()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 121, in wait
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup return hubs.get_hub().switch()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 294, in switch
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup return self.greenlet.switch()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup result = function(*args, **kwargs)
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/openstack/common/service.py", line 495, in run_service
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup service.start()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/common/service.py", line 75, in start
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup self.manager.init_host()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/conductor/manager.py", line 247, in init_host
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup self._driver_factory = driver_factory.DriverFactory()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/common/driver_factory.py", line 86, in __init__
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup DriverFactory._init_extension_manager()
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 445, in inner
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup return f(*args, **kwargs)
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/common/driver_factory.py", line 126, in _init_extension_manager
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup on_load_failure_callback=_catch_driver_not_found))
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/stevedore/dispatch.py", line 155, in __init__
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup verify_requirements=verify_requirements,
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/stevedore/enabled.py", line 59, in __init__
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup verify_requirements=verify_requirements,
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 92, in __init__
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup verify_requirements)
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/stevedore/extension.py", line 170, in _load_plugins
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup self._on_load_failure_callback(self, ep, err)
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup File "/usr/local/lib/python2.7/dist-packages/ironic/common/driver_factory.py", line 115, in _catch_driver_not_found
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup raise exception.DriverLoadError(driver=ep.name, reason=exc)
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup DriverLoadError: Driver agent_ucs could not be loaded. Reason: name 'YesOrNo' is not defined.
2015-06-12 16:50:06.621 32152 ERROR ironic.openstack.common.threadgroup
WORKAROUND:
So the __init__.py from UcsSdk is missing. As a workaround you can copy that __init__.py and then the ironic-conductor will load the driver (run as root):
# curl https:/ /raw.githubuser content. com/CiscoUcs/ UcsPythonSDK/ master/ src/UcsSdk/ __init_ _.py > /usr/lib/ python2. 7/site- packages/ UcsSdk/ __init_ _.py
Now restart the Ironic conductor service.