Bug 1365751

Summary: force_fail plugin fails with python3
Product: [oVirt] otopi Reporter: Yedidyah Bar David <didi>
Component: Plugins.GeneralAssignee: Yedidyah Bar David <didi>
Status: CLOSED CURRENTRELEASE QA Contact: Yedidyah Bar David <didi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: masterCC: bugs, didi, oourfali, pstehlik, sbonazzo, ylavi
Target Milestone: ovirt-4.1.0-alphaKeywords: CodeChange
Target Release: 1.6.0Flags: rule-engine: ovirt-4.1+
ylavi: Triaged+
ylavi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 12:42:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1316950, 1379402    

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