Bug 1365751 - force_fail plugin fails with python3
Summary: force_fail plugin fails with python3
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: otopi
Classification: oVirt
Component: Plugins.General
Version: master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ovirt-4.1.0-alpha
: 1.6.0
Assignee: Yedidyah Bar David
QA Contact: Yedidyah Bar David
URL:
Whiteboard:
Depends On:
Blocks: 1316950 1379402
TreeView+ depends on / blocked
 
Reported: 2016-08-10 07:16 UTC by Yedidyah Bar David
Modified: 2019-04-28 13:17 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-17 12:42:09 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.1+
ylavi: Triaged+
ylavi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 62184 0 master MERGED plugins: force_fail: set _prio only if stage is set 2016-09-13 10:05:39 UTC

Description Yedidyah Bar David 2016-08-10 07:16:33 UTC
Description of problem:

force_fail sets _prio to the env var 'OTOPI_FORCE_FAIL_PRIORITY', and if that's not set, to None.

Later on, otopi compares priorities, and python3 fails when comparing None to a number, e.g.:

Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/otopi/__main__.py", line 88, in main
    installer.execute()
  File "/usr/lib/python3.5/site-packages/otopi/main.py", line 151, in execute
    self.context.buildSequence()
  File "/usr/lib/python3.5/site-packages/otopi/context.py", line 665, in buildSequence
    self._sequence = self._toposortBuildSequence()
  File "/usr/lib/python3.5/site-packages/otopi/context.py", line 554, in _toposortBuildSequence
    j for j, m in enumerate(methods)
  File "/usr/lib/python3.5/site-packages/otopi/context.py", line 558, in <listcomp>
    m['priority'] < method['priority']
TypeError: unorderable types: NoneType() < int()

Comment 1 Yaniv Lavi 2016-08-26 15:03:34 UTC
Is this a codechange?

Comment 2 Yedidyah Bar David 2016-08-28 12:54:18 UTC
(In reply to Yaniv Dary from comment #1)
> Is this a codechange?

Currently it is, until patch for bug 1316950 is merged.

Comment 3 Pavel Stehlik 2016-08-29 09:55:54 UTC
Nothing for QE - CodeChange

Comment 4 Sandro Bonazzola 2016-10-24 09:21:56 UTC
Didi, referenced patch has been merged, anything else preventing to move to modified?

Comment 5 Sandro Bonazzola 2016-12-12 13:56:10 UTC
The fix for this issue should be included in oVirt 4.1.0 beta 1 released on December 1st. If not included please move back to modified.

Comment 6 Gil Klein 2017-01-17 12:42:09 UTC
Closed based on comment #2


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