Bug 2000046

Summary: Switch virdomain to virdomain.Disconnected when VM is shut down
Product: [oVirt] vdsm Reporter: Vojtech Juranek <vjuranek>
Component: CoreAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.40.80.6CC: ahadas, bugs, dfodor, mzamazal
Target Milestone: ovirt-4.5.2Flags: pm-rhel: ovirt-4.5?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.50.2.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-08 08:17:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vojtech Juranek 2021-09-01 09:27:02 UTC
Description of problem:

After migration, when VM on the source is shut down (and VM status is set to DOWN), domain object is still virdomain.Notifying. Is should be switched to virdomain.Disconnected or virdomain.Defined so that it throws virdomain.NotConnectedError on any call. This exception can be properly handled by the callers.

Comment 1 Arik 2021-09-02 13:09:33 UTC
(In reply to Vojtech Juranek from comment #0)
> Description of problem:
> 
> After migration, when VM on the source is shut down (and VM status is set to
> DOWN), domain object is still virdomain.Notifying. Is should be switched to
> virdomain.Disconnected or virdomain.Defined so that it throws
> virdomain.NotConnectedError on any call. This exception can be properly
> handled by the callers.

from Virt perspective, the VM is locked on the engine side and when the engine gets the updated status, it will issue a destroy call to remove the vm
Vojtech, does it lead to any kind of issue for storage?

setting low severity for now

Comment 2 Vojtech Juranek 2021-09-03 06:25:42 UTC
 
> from Virt perspective, the VM is locked on the engine side and when the
> engine gets the updated status, it will issue a destroy call to remove the vm
> Vojtech, does it lead to any kind of issue for storage?

yes, we expect to get NotConnectedError when the VM is not running, while in currect situation we get various libvirt exceptions (e.g. VIR_ERR_OPERATION_INVALID). See e.g. BZ #1981079


> setting low severity for now

Yes, it's fine, it's not a big problem for us and we can eventually fix it - I already started to work on it (https://gerrit.ovirt.org/c/vdsm/+/115784) as part of fix for BZ #1981079. Will return to it once I finish more urgent stuff.

Comment 4 Sandro Bonazzola 2022-08-30 08:49:07 UTC
This bugzilla is included in oVirt 4.5.2 release, published on August 10th 2022.
Since the problem described in this bug report should be resolved in oVirt 4.5.2 release, it has been closed with a resolution of CURRENT RELEASE.
If the solution does not work for you, please open a new bug report.