Bug 1626341 - staging-ovirt Global Name SDK is not defined
Summary: staging-ovirt Global Name SDK is not defined
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-ironic
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-07 05:36 UTC by Brendan Shephard
Modified: 2018-09-18 03:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-18 03:46:50 UTC


Attachments (Terms of Use)
Output of openstack overcloud node import (46.36 KB, text/plain)
2018-09-07 05:36 UTC, Brendan Shephard
no flags Details

Description Brendan Shephard 2018-09-07 05:36:24 UTC
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()

Comment 1 Ilya Etingof 2018-09-11 23:44:39 UTC
Please confirm that ironic conductor has been restarted after python-ovirt-engine-sdk4 package was installed.

Comment 2 Brendan Shephard 2018-09-12 03:54:20 UTC
(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?


Note You need to log in before you can comment on or make changes to this bug.