backup operation of volume backed instances cannot be done in pause and suspend state

Bug #1564596 reported by Saverio Proto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Won't Fix
Undecided
Unassigned
tempest
Triaged
Wishlist
Unassigned

Bug Description

This is a corner case of bug https://bugs.launchpad.net/nova/+bug/1361487

While bug 1361487 was fixed in Kilo in https://review.openstack.org/#/c/116789/

the problem is still present when the instance is volume backed. You will get this exception in the logs

upstart/nova-api.log:2016-03-22 08:49:53.925 3557 INFO nova.api.openstack.wsgi [req-6e6982b6-917f-4039-bef4-2da25e859011 dea08a1751064e5180cdd3d5701047d8 453670a92914454dae57f61e417a428f - - -] HTTP exception thrown: Cannot 'createImage' instance 0cbc3c3a-065f-4d2e-a1c2-b0e274553a70 while it is in vm_state paused

Revision history for this message
Saverio Proto (zioproto) wrote :

This review fixes the bug https://review.openstack.org/#/c/295865/

I was asked during the patchset review to add this bug report in launchpad for tracking purposes.

Changed in nova:
assignee: nobody → Saverio Proto (zioproto)
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :

I did some digging in Tempest this morning and there is a volume snapshots compute API test:

https://github.com/openstack/tempest/blob/master/tempest/api/compute/volumes/test_volume_snapshots.py#L42

However, that's simply testing the nova API proxy to the cinder API to snapshot a volume, it's not actually attached to a server instance. And it's redundant with another Tempest test, so probably needs to be removed or rewritten to include a server.

There is the test_stamp_pattern scenario test which snapshots a volume-backed server, but it's currently being skipped (I'm working on unskipping it).

So I think we basically need to cleanup https://github.com/openstack/tempest/blob/master/tempest/api/compute/volumes/test_volume_snapshots.py#L42 or add another set of tests in there which do the following:

1. snapshot a volume-backed server that is active (default case)
2. snapshot a volume-backed server that is shutdown
3. snapshot a volume-backed server that is paused
4. snapshot a volume-backed server that is suspended

I could see most of that test code being common code in the module, with individual tests calling it and passing in or handling the pre-condition for the server state.

Changed in tempest:
importance: Undecided → Wishlist
Changed in tempest:
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/295865
Reason: This seems to have reached a natural conclusion.

Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → New
assignee: Saverio Proto (zioproto) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Automatically discovered version kilo in description. If this is incorrect, please update the description to include 'nova version: ...'

tags: added: openstack-version.kilo
Revision history for this message
Sean Dague (sdague) wrote :

The bug seems like live snapshot was actually the right solution, not changing this.

Changed in nova:
status: New → Won't Fix
Revision history for this message
Lukas Piwowarski (lukas-piwowarski) wrote (last edit ):

It seems that current state is that the nova API allows both:
- create snapshot of [PAUSED, STOPPED, SUSPENDED] volume backed instance [1] and
- create backup of [PAUSED, STOPPED, SUSPENDED] volume backed instance [2].

In tempest, we do not test any of the mentioned cases.

[1] https://opendev.org/openstack/nova/commit/cfde53e4b402e71d7f53b6e0ab232854dba160dc
[2] https://opendev.org/openstack/nova/commit/e0552af51ce1246e9c938720009c89ccfa008f2f

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.