Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1264195 - Typo in ovirtnode/storage.py reread_partitions causes RHEV-H install to fail
Typo in ovirtnode/storage.py reread_partitions causes RHEV-H install to fail
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node (Show other bugs)
3.5.0
All Linux
high Severity medium
: ovirt-3.6.1
: 3.6.0
Assigned To: Fabian Deutsch
Ying Cui
: ZStream
Depends On:
Blocks: 1280213
  Show dependency treegraph
 
Reported: 2015-09-17 16:15 EDT by Derrick Ornelas
Modified: 2016-03-09 09:38 EST (History)
9 users (show)

See Also:
Fixed In Version: ovirt-node-3.6.0-0.24.20151209gitc0fa931.el7ev
Doc Type: Bug Fix
Doc Text:
Fixed an error in the code that caused device discovery to take longer than it should when installing Red Hat Enterprise Virtualization.
Story Points: ---
Clone Of:
: 1280213 (view as bug list)
Environment:
Last Closed: 2016-03-09 09:38:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Node
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot of traceback (48.39 KB, image/png)
2015-09-17 16:15 EDT, Derrick Ornelas
no flags Details
simple patch (618 bytes, patch)
2015-09-17 16:37 EDT, Derrick Ornelas
no flags Details | Diff
screenshot.png (85.24 KB, image/png)
2015-10-21 08:14 EDT, Ying Cui
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1751973 None None None Never
oVirt gerrit 46338 master MERGED storage: Fix typo in installer code Never
oVirt gerrit 48970 ovirt-3.6 MERGED storage: Fix typo in installer code Never
oVirt gerrit 48971 ovirt-3.5 MERGED storage: Fix typo in installer code Never
Red Hat Product Errata RHBA-2016:0378 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update for RHEV 3.6 2016-03-09 14:06:36 EST

  None (edit)
Description Derrick Ornelas 2015-09-17 16:15:11 EDT
Created attachment 1074577 [details]
screenshot of traceback

Description of problem:  

Typo in ovirtnode/storage.py causes RHEV-H install to fail randomly with traceback:

  File "/usr/lib/python2.6/site-packages/ovirtnode/storage.py", line 251, in reread_partitions
    "secs") % (timeout -i)
TypeError: unsupported operand type(s) for %: 'NoneType' and 'int'



ovirt-node-3.2.3/src/ovirtnode/storage.py:
---
 243         if "dev/mapper" in drive:
 244             _functions.system("service multipathd reload")
 245             _functions.system("multipath -r &>/dev/null")
 246             # wait for device to exit
 247             i = 0
 248             timeout = 15
 249             while not os.path.exists(drive):
 250                 logger.error(drive + " is not available, waiting %s more " +
 251                              "secs") % (timeout - i)
 252                 i = i + i
 253                 time.sleep(1)
 254                 if i == timeout:
 255                     logger.error("Timed out waiting for: %s" % drive)
 256                     return False
---


Version-Release number of selected component (if applicable):
ovirt-node-3.2.3-20.el6


How reproducible:  unknown


Steps to Reproduce:
1.  Start install of RHEV-H 6.7


Actual results:
Sometimes install fails with traceback as seen in attached screenshot

Expected results:
Install finishes successfully


Additional info:

The line:

 251                              "secs") % (timeout - i)

should be:

 251                              "secs" % (timeout - i))



It's likely that the line:

 252                 i = i + i

should be:

 252                 i = i + 1

as well.
Comment 1 Derrick Ornelas 2015-09-17 16:37:33 EDT
Created attachment 1074578 [details]
simple patch
Comment 2 Fabian Deutsch 2015-09-18 03:50:16 EDT
Thanks for the patch. I had to modify it slightly, because the format string needed another pair of braces.
Comment 3 Ying Cui 2015-10-21 08:13:53 EDT
I change the QA Contact to myself to follow this bug further.
I tested clean automatic installation and TUI reinstallation with build rhev-hypervisor6-6.7-20150828.0.el6ev and build rhev-hypervisor6-6.7-20150911.0.el6ev on ibm-3650m4-02(did not use remotely media via imm, just use PXE) and dell-R910(pxe) servers with FC HBA 6 times.
I did not encounter installation failed issue and did not see the traceback error during my testing.

According to this code, I did the following, here can see the detail in screenshot, but the device is forced reload quickly, can not easy to trigger " while not os.path.exists"
# systemctl multipathd reload; multipath -r; ll /dev/mapper/3600a0b80005ada7600004b9455a5ddb0
Comment 4 Ying Cui 2015-10-21 08:14 EDT
Created attachment 1085105 [details]
screenshot.png
Comment 5 Ying Cui 2015-10-21 08:25:26 EDT
Hi Derrick,
  We can not reproduce this issue on QE's test environment. QE verified the patches modification is valid. Could you help to provide the RHEV-H 3.5.6 build to customer to verify this bug once the build is built ready by devel? QE will do sanity testing as well for this bug fix.

Thanks
Ying
Comment 12 Ying Cui 2015-12-29 00:09:43 EST
According to comment 9, Checked the code patch verification pass.

Did the sanity testing on this bug on FC machine PASS.
Sanity coverage scenarios:
1. clean automatic installation PASS
2. TUI clean installation PASS
3. TUI reinstallation PASS

# cat /etc/redhat-release 
Red Hat Enterprise Virtualization Hypervisor (Beta) release 7.2 (20151221.1.el7ev)
# rpm -qa ovirt-node
ovirt-node-3.6.0-0.24.20151209gitc0fa931.el7ev.noarch
Comment 14 errata-xmlrpc 2016-03-09 09:38:52 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0378.html

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