Bug 825809 - [Storage][Snapshots] Null pointer exception when trying to remove snapshots when VM has no disks.
[Storage][Snapshots] Null pointer exception when trying to remove snapshots w...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
Unspecified Unspecified
unspecified Severity high
: ---
: 3.1.0
Assigned To: Allon Mureinik
vvyazmin@redhat.com
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-28 10:10 EDT by Leonid Natapov
Modified: 2016-02-10 11:48 EST (History)
9 users (show)

See Also:
Fixed In Version: SI13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log file (10.08 KB, text/plain)
2012-05-28 10:10 EDT, Leonid Natapov
no flags Details

  None (edit)
Description Leonid Natapov 2012-05-28 10:10:17 EDT
Created attachment 587243 [details]
log file

[Storage][Snapshots] Null pointer exception when trying to remove snapshots when VM has no disks.

How to reproduce:
1.Create VM with disk or several disks.
2.Create snapshot.
3.Delete disks.
4.Try to remove snapshot.

It is not clear what was the decision about what should happen to a snapshots when removing VM's disks. If we want to leave the snapshot we have to handle all the snapshot's actions like preview,commit,delete.

engine.log attached.
Comment 1 Asaf Shakarchi 2012-07-03 09:49:10 EDT
Not a NPE but IndexOutOfBoundsException,

To clarify the expected behaviour:

- When a disk is deleted, the snapshot should be kept, this is the current behaviour which is fine.

- A snapshot should be deleted silently when a disk is not available any longer.

- Preview should restore the disk entity in RHEVM but the disk state should be 'illegal'. currently preview with a deleted disk causes another exception, I'll open another BZ for this issue.
Comment 2 Allon Mureinik 2012-07-10 07:24:19 EDT
This usecase is blocked by the UI (i.e., manipulating snapshots with no disks), with commit hash f8ba703f72737d585811bc36fc6106aa84cafe6a.

Do we want to remove this block, and address the bug? What is the expected behavior?
Comment 3 Allon Mureinik 2012-07-10 07:33:17 EDT
ignore last comment - misunderstood the flow.
Comment 4 Allon Mureinik 2012-07-23 12:13:41 EDT
patch http://gerrit.ovirt.org/#/c/6119/ was MERGED.

steps to reproduce are as described in Leonid's initial message.
Comment 5 Haim 2012-07-29 10:40:02 EDT
verified on SI12 - snapshot is now removed.

there is a small bug that removeSnapshot is missing from exception messages, will open a new one since i don't know if its related.

2012-07-29 20:56:49,287 WARN  [org.ovirt.engine.core.dal.job.ExecutionMessageDirector] (ajp-/127.0.0.1:8009-15) [2c369c68] The message key RemoveSnapshot is missing from bundles/ExecutionMessages
2012-07-29 20:56:49,388 INFO  [org.ovirt.engine.core.bll.RemoveSnapshotCommand] (ajp-/127.0.0.1:8009-15) [2c369c68] Lock Acquired to object EngineLock [exclusiveLocks= key: 9c9bc1f1-8f90-4464-bfb4-0bf73a478c74 value: VM
, sharedLocks= ]
2012-07-29 20:56:49,392 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (ajp-/127.0.0.1:8009-15) [2c369c68] START, IsValidVDSCommand(storagePoolId = 77887fd1-3408-44ec-8de4-153948d89cdc, ignoreFailoverLimit = false, compatabilityVersion = null), log id: 1509eea8
2012-07-29 20:56:49,393 INFO  [org.ovirt.engine.core.vdsbroker.irsbroker.IsValidVDSCommand] (ajp-/127.0.0.1:8009-15) [2c369c68] FINISH, IsValidVDSCommand, return: true, log id: 1509eea8
2012-07-29 20:56:49,630 INFO  [org.ovirt.engine.core.bll.RemoveSnapshotCommand] (ajp-/127.0.0.1:8009-15) [2c369c68] Running command: RemoveSnapshotCommand internal: false. Entities affected :  ID: 9c9bc1f1-8f90-4464-bfb4-0bf73a478c74 Type: VM
2012-07-29 20:56:49,777 INFO  [org.ovirt.engine.core.bll.RemoveSnapshotCommand] (ajp-/127.0.0.1:8009-15) [2c369c68] Lock freed to object EngineLock [exclusiveLocks= key: 9c9bc1f1-8f90-4464-bfb4-0bf73a478c74 value: VM
, sharedLocks= ]
2012-07-29 20:57:51,705 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-42) Setting new tasks map. The map contains now 0 tasks
2012-07-29 20:57:51,705 INFO  [org.ovirt.engine.core.bll.AsyncTaskManager] (QuartzScheduler_Worker-42) Cleared all tasks of pool 77887fd1-3408-44ec-8de4-153948d89cdc

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