Bug 1527134 - Removing a disk with a non-existent snapshot fails
Summary: Removing a disk with a non-existent snapshot fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.7
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.1
: ---
Assignee: Nobody
QA Contact: Natalie Gavrielov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-18 15:56 UTC by Gordon Watson
Modified: 2021-03-11 19:16 UTC (History)
9 users (show)

Fixed In Version: ovirt-engine-4.2.1.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-15 17:46:56 UTC
oVirt Team: Storage
Target Upstream Version:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3291611 0 None None None 2017-12-18 16:14:49 UTC
Red Hat Product Errata RHEA-2018:1488 0 None None None 2018-05-15 17:48:00 UTC
oVirt gerrit 85568 0 master MERGED core: ImagesHandler#prepareSnapshotConfigWithAlternateImage 2020-09-04 17:12:43 UTC

Description Gordon Watson 2017-12-18 15:56:27 UTC
Description of problem:

Attempting to remove a disk that has a snapshot that no longer exists will fail and report an NPE;

2017-12-05 08:01:50,748 ERROR [org.ovirt.engine.core.bll.RemoveImageCommand] (org.ovirt.thread.pool-6-thread-50) [3cc86586] Exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.ImagesHandler.prepareSnapshotConfigWithAlternateImage(ImagesHandler.java:835) [bll.jar:]



Version-Release number of selected component (if applicable):

RHV 4.1.7


How reproducible:

100%

Steps to Reproduce:
1. Create a VM.
2. Add a disk.
3. Create a snapshot.
4. Delete the snapshots table entry.
5. 'Remove permanently' from the GUI.


Actual results:


Expected results:


Additional info:

Comment 3 Natalie Gavrielov 2018-02-07 14:38:36 UTC
Allon,

I tried the scenario described in comment 0, and now the snapshot that was deleted from the db is removed automatically from the GUI (after a few seconds), is this the expected behavior?

Comment 4 Allon Mureinik 2018-02-07 15:13:05 UTC
(In reply to Natalie Gavrielov from comment #3)
> Allon,
> 
> I tried the scenario described in comment 0, and now the snapshot that was
> deleted from the db is removed automatically from the GUI (after a few
> seconds), is this the expected behavior?

If a snapshot is removed from the DB I'd indeed expect it to be removed from the UI.
The verification here is to attempt to remove a disk that references that snapshot and see it doesn't crash horribly.

Comment 5 Natalie Gavrielov 2018-02-07 15:25:21 UTC
Verified using:
rhvm-4.2.1.6-0.1.el7.noarch
vdsm-4.20.17-1.el7ev.x86_64

Now disk can be removed from the GUI, no NPE.

Comment 10 errata-xmlrpc 2018-05-15 17:46:56 UTC
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://access.redhat.com/errata/RHEA-2018:1488

Comment 11 Franta Kust 2019-05-16 13:06:36 UTC
BZ<2>Jira Resync

Comment 12 Daniel Gur 2019-08-28 13:13:33 UTC
sync2jira

Comment 13 Daniel Gur 2019-08-28 13:17:47 UTC
sync2jira


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