Bug 1316128 - Error catching mechanism is required in vm.py
Error catching mechanism is required in vm.py
Product: vdsm
Classification: oVirt
Component: Core (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ovirt-4.1.0-alpha
: ---
Assigned To: Francesco Romani
Israel Pinto
: CodeChange
Depends On:
  Show dependency treegraph
Reported: 2016-03-09 08:33 EST by Amit Aviram
Modified: 2017-02-15 10:01 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-02-15 10:01:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1+
rule-engine: planning_ack+
rule-engine: devel_ack+
mavital: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 54664 master MERGED virt: common handling of exceptions 2016-03-25 09:15 EDT

  None (edit)
Description Amit Aviram 2016-03-09 08:33:30 EST
Description of problem:
Currently, there is no error catching mechanism in vm.py, which causes cumbersome error catchings in the module's functions, and thus dirty code.

A proper mechanism is required for making the code look better, easier maintenance, and better error responses in vm.py flows.
Comment 1 Michal Skrivanek 2016-03-14 03:47:31 EDT
what kind of error catching mechanism do you have in mind? For what exactly? Can you share some examples?
Comment 2 Amit Aviram 2016-03-15 08:02:13 EDT
Francesco's patch is attached, dropping needinfo flag.
(Francesco, Thanks!)
Comment 3 Francesco Romani 2016-04-06 07:47:08 EDT
Please note that the infrastructure is merged, we "just" need to convirt the virt flows to use it.
Comment 4 Francesco Romani 2016-10-17 03:00:57 EDT
All needed patches merged to master, further refinement in progress, but the core parts are in.

Please note this bug has not user-visible impact (besides regression testing), hence the CodeChange.
Comment 5 meital avital 2016-11-21 04:03:15 EST
Please provide steps to verify
Comment 6 Francesco Romani 2016-11-21 04:10:44 EST
We need just regression testing here; use the system as usual, make sure errors are reported when one operation fails. Make sure to cover all (major) the flows.

This BZ fails verification basically if Vdsm crashes (stacktrace in the logs) or if one error is misreported after a failed action.

I believe no special action is strictly needed here; testing for this BZ could be safely piggybacked on the test for all the other features.
Comment 7 Sandro Bonazzola 2016-12-12 09:00:25 EST
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 8 Francesco Romani 2016-12-16 09:29:27 EST
this test is an internal code change, we don't need doc_text either.
Comment 9 Israel Pinto 2017-01-16 04:43:44 EST
Verify with:
Engine: 4.2.0-0.0.master.20170104114928.git5490b36.el7.centos
OS Version:RHEL - 7.3 - 7.el7
Kernel Version:3.10.0 - 514.el7.bug1404060_20.x86_64
KVM Version:2.6.0 - 28.el7_3.3
LIBVIRT Version:libvirt-2.0.0-10.el7_3.2
VDSM Version:vdsm-4.20.0-128.git7001c0a.el7.centos
SPICE Version:0.12.4 - 19.el7

Run Virt sanity test (via automation all pass)

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