Created attachment 1481484 [details] Output of openstack overcloud node import Description of problem: Using the staging-ovirt driver, openstack overcloud node import ~/instackenv.json With the following error: ~~~ [{u'result': u'Node b288f31a-e27b-4879-8557-b7c30eed7f24 did not reach state "manageable", the state is "enroll", error: Failed to get power state for node b288f31a-e27b-4879-8557-b7c30eed7f24. Error: global name \'sdk\' is not defined'}, {u'result': u'Node c4cba907-14ec-45c0-830c-c7b1b913ba9f did not reach state "manageable", the state is "enroll", error: Failed to get power state for node c4cba907-14ec-45c0-830c-c7b1b913ba9f. Error: global name \'sdk\' is not defined'}] {u'status': u'FAILED', u'message': [{u'result': u'Node b288f31a-e27b-4879-8557-b7c30eed7f24 did not reach state "manageable", the state is "enroll", error: Failed to get power state for node b288f31a-e27b-4879-8557-b7c30eed7f24. Error: global name \'sdk\' is not defined'}, {u'result': u'Node c4cba907-14ec-45c0-830c-c7b1b913ba9f did not reach state "manageable", the state is "enroll", error: Failed to get power state for node c4cba907-14ec-45c0-830c-c7b1b913ba9f. Error: global name \'sdk\' is not defined'}], u'result': None} Exception registering nodes: {u'status': u'FAILED', u'message': [{u'result': u'Node b288f31a-e27b-4879-8557-b7c30eed7f24 did not reach state "manageable", the state is "enroll", error: Failed to get power state for node b288f31a-e27b-4879-8557-b7c30eed7f24. Error: global name \'sdk\' is not defined'}, {u'result': u'Node c4cba907-14ec-45c0-830c-c7b1b913ba9f did not reach state "manageable", the state is "enroll", error: Failed to get power state for node c4cba907-14ec-45c0-830c-c7b1b913ba9f. Error: global name \'sdk\' is not defined'}], u'result': None} ~~~ Version-Release number of selected component (if applicable): RHOSP13 openstack-ironic-staging-drivers-0.9.0-4.el7ost.noarch openstack-ironic-api-10.1.3-5.el7ost.noarch openstack-ironic-conductor-10.1.3-5.el7ost.noarch openstack-ironic-inspector-7.2.1-2.el7ost.noarch openstack-ironic-common-10.1.3-5.el7ost.noarch How reproducible: Every time Steps to Reproduce: 1. Create instackenv.json file (attached) 2. openstack overcloud node import ~/instackenv.json 3. Error appears in output Actual results: Global Name SDK is not defined Expected results: ironic should enroll the oVirt VM's Additional info: I initially assumed this was due to missing python-ovirt-engine-sdk4 As we can see ovirtsdk4 being imported as sdk here: [root@director ovirtsdk4]# grep sdk /usr/lib/python2.7/site-packages/ironic_staging_drivers/ovirt/ovirt.py via oVirt sdk API. ovirtsdk = importutils.try_import('ovirtsdk4') if ovirtsdk: import ovirtsdk4 as sdk import ovirtsdk4.types as otypes However, after installing the python-ovirt-engine-sdk4 package and being able to import ovirtsdk4 in python2.7 and 3. I'm still getting the same error: [root@director ovirtsdk4]# python Python 2.7.5 (default, May 31 2018, 09:41:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ovirtsdk4 as sdk >>> >>> >>> quit()
Please confirm that ironic conductor has been restarted after python-ovirt-engine-sdk4 package was installed.
(In reply to Ilya Etingof from comment #1) > Please confirm that ironic conductor has been restarted after > python-ovirt-engine-sdk4 package was installed. Looks like that may have been the problem. The system has been shutdown since raising this bug and - after some clean up from the failed attempts, it is now working. Apologies, I guess we can NOTABUG this one. Although, maybe we should install python-ovirt-engine-sdk4 by default when the user has staging-ovirt listed in undercloud.conf?