Can't register nodes with oVirt driver

Bug #1761724 reported by Derek Higgins
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ironic-staging-drivers
In Progress
Undecided
Derek Higgins

Bug Description

Nodes being registered with the oVirt driver can hit the following error if a unicode string is passed to ironic (not necessarily containing multibyte characters)

2018-03-29 07:00:58.148 3756 ERROR ironic.conductor.manager [req-c9720ee5-fe91-4c28-b818-c3edca18d7fd 7269b7f74ab34dad801bcf76eec969df b12d981054544dfe9fcbbfea8a0669f5 - default default] Failed to get power state for node ed8eda70-3a8e-4096-bc73-341f419ba164. Error: invalid arguments to setopt

The problem is that it accepts strings, not unicode objects.

python-pycurl-7.19.0-19.el7.x86_64

>>> c = pycurl.Curl()
>>> c.setopt(pycurl.URL, "http://a.com")
>>> c.setopt(pycurl.URL, u"http://a.com")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: invalid arguments to setopt

Revision history for this message
Derek Higgins (derekh) wrote :

In ./ironic_staging_drivers/ovirt/ovirt.py:_getvm
Wrapping url in str(url) fixes the problem assuming the VM name doesn't contain multibyte characters

Revision history for this message
Derek Higgins (derekh) wrote :
Changed in ironic-staging-drivers:
status: New → In Progress
assignee: nobody → Derek Higgins (derekh)
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.