Hyper-V: snapshot fails if the instance is destroyed beforehand

Bug #1486458 reported by Claudiu Belu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Claudiu Belu

Bug Description

Instance destroy and Instance snapshot are locking operations, meaning that they can only occur sequencially. This is the result of the bugfix for https://bugs.launchpad.net/nova/+bug/1461970 .

The problem is that the destroy instance can occur before snapshoting, resulting in a VM NotFound exception being raised while snapshoting, as the VM no longer exists. In the logs it can be observed that the lock was being held by "do_terminate_instance", which was then aquired by "instance_synchronized_snapshot".

This causes failures in some tempest tests.

Logs: http://paste.openstack.org/show/421642/

Tags: hyper-v
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/214560

tags: added: liberty-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/214560
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0d0e1cd0a1248076972bfc5ea310a535c11ef796
Submitter: Jenkins
Branch: master

commit 0d0e1cd0a1248076972bfc5ea310a535c11ef796
Author: Claudiu Belu <email address hidden>
Date: Wed Aug 19 14:04:13 2015 +0300

    Hyper-V: Fixes snapshoting inexistent VM issue

    Instance destroy and Instance snapshot are locking operations, meaning
    that they can only occur sequentially. This is the result of the commit
    6d8903b5d9609305d63aba0067a032a66f5ce3ee

    The problem is that the destroy instance can occur before snapshoting,
    resulting in a VM NotFound exception being raised while snapshoting, as
    the VM no longer exists. In the logs it can be observed that the lock was
    being held by "do_terminate_instance", which was then aquired by
    "instance_synchronized_snapshot".

    Nova ComputeManager expects an InstanceNotFound exception during the
    snapshot operation.

    Changes exception raised by VMUtils._check_lookup_vm to InstanceNotFound.

    Change-Id: I3e4d4f1874c6ee4b410e8bda7412d49f079b5b8f
    Closes-Bug: #1486458

Changed in nova:
status: In Progress → Fix Committed
Matt Riedemann (mriedem)
tags: removed: liberty-rc-potential
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-rc1 → 12.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.