Bug 1740098
Summary: | [v2v][Scale][RHV] Single VM migration failed, but related virt-v2v error is not logged. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Ilanit Stein <istein> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 8.1 | CC: | bthurber, fdupont, jsuchane, mxie, mzhan, nsoffer, ptoscano, rjones, tzheng, xiaodwan, zili |
Target Milestone: | rc | Flags: | istein:
needinfo+
|
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | V2V | ||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-01-23 13:04:41 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Ilanit Stein
2019-08-12 09:54:09 UTC
Note for QE: 1.40.2-5.el7.1.bz1680361.v3.1.x86_64 is a package I built for Ilanit which is the same as 1.40.2-5.el7 + a couple of patches attempting to fix bz1680361. Nir, can you tell us what we need to do to capture the "true" Python error? (In reply to Richard W.M. Jones from comment #3) > Nir, can you tell us what we need to do to capture the "true" Python error? We need to ensure that error during cleanup flow are handled and not raised, hiding the original error that lead to the cleanup flow. I hope that this code makes the error clear. $ cat example.py def import_vm(): raise Exception("real error") def cleanup(): raise Exception("cleanup error") try: import_vm() except Exception: cleanup() raise $ python example.py Traceback (most recent call last): File "example.py", line 10, in <module> cleanup() File "example.py", line 5, in cleanup raise Exception("cleanup error") Exception: cleanup error The real error is hidden by the cleanup error, so we cannot fix the real issue. This is mainly python 2 issue. With python 3 we see: $ python3 example.py Traceback (most recent call last): File "example.py", line 8, in <module> import_vm() File "example.py", line 2, in import_vm raise Exception("real error") Exception: real error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "example.py", line 10, in <module> cleanup() File "example.py", line 5, in cleanup raise Exception("cleanup error") Exception: cleanup error To fix this in python 2, we need to make sure cleanup never raises. it must handle error cleanup errors by logging them. $ cat example_fix.py import logging def import_vm(): raise Exception("real error") def cleanup(): try: raise Exception("cleanup error") except Exception: logging.exception("Error while cleaning up") try: import_vm() except Exception: cleanup() raise Now we will see both errors: $ python example_fix.py ERROR:root:Error while cleaning up Traceback (most recent call last): File "example_fix.py", line 8, in cleanup raise Exception("cleanup error") Exception: cleanup error Traceback (most recent call last): File "example_fix.py", line 13, in <module> import_vm() File "example_fix.py", line 4, in import_vm raise Exception("real error") Exception: real error Richard, Can this bug get fixed sooner please, for RHEL-7.7/8? We're not doing anything for RHEL 7.8. RHEL 8 has Python 3 so apparently would not be affected. As usual for changes to the rhv-upload backend we need patches that have been fully tested. I have no time or manpower to make these changes right now. This bug do not reproduce on a small scale RHV. I'll try to reproduce it on the large scale RHV, where it was found, once it's free to use. I tried to reproduce it on large scale RHV environment RHV-4.3.6, with CFME-5.11.0.24. however it did not reproduce so far. if/once I'll see it again, I'll update this bug. Ilanit. Have you reproduced this BZ since September ? If not, could you consider closing it ? This bug will be addressed in next major release. In reply to comment #9: I did not reproduce this bug so far. This bug is about improving the code, so that hidden errors will be reported. Therefore, I am not sure a reproduce in the case is required. This is not impacting RHEL8 as the default is python3. |