Bug 1835292 - Error creating snapshot from instance when vm is paused and instance is booted from volume
Summary: Error creating snapshot from instance when vm is paused and instance is boote...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: beta
: 17.0
Assignee: Lee Yarwood
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks: 1838668 1838669 1838671
TreeView+ depends on / blocked
 
Reported: 2020-05-13 14:43 UTC by Ivan Richart
Modified: 2023-12-15 17:53 UTC (History)
10 users (show)

Fixed In Version: openstack-nova-23.0.3-0.20210908140341.e39bbdc.el9ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1838668 (view as bug list)
Environment:
Last Closed: 2022-09-21 12:10:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1878583 0 None None None 2020-05-14 10:20:47 UTC
OpenStack gerrit 728011 0 None MERGED compute: Allow snapshots to be created from PAUSED volume backed instances 2020-12-03 13:39:43 UTC
OpenStack gerrit 728012 0 None MERGED compute: Remove snapshot quiesce tests for STOPPED and SUSPENDED instances 2020-12-03 13:39:42 UTC
OpenStack gerrit 728013 0 None ABANDONED compute: Add a PAUSED volume backed instance snapshot test 2020-12-03 13:40:09 UTC
Red Hat Issue Tracker OSP-10072 0 None None None 2022-04-13 19:56:41 UTC
Red Hat Product Errata RHEA-2022:6543 0 None None None 2022-09-21 12:11:51 UTC

Description Ivan Richart 2020-05-13 14:43:52 UTC
Description of problem:

We want to create nova snapshot from instance. This instance has only one disk booting from cinder volume. 
If we try to create snapshot from running instance, there is not problem. Problem appears when we want snapshot from instance in paused mode

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

Red Hat Enterprise Linux Server release 7.8 (Maipo)

Red Hat OpenStack Platform release 13.0.11 (Queens)

How reproducible:

Create instance from volume (vda disk as root disk)
Pause VM
Create snapshot from instance paused


Steps to Reproduce:
1.
2.
3.
openstack server create --flavor n1.tiny --nic net-id=net1 --volume Centos vm1


(overcloud) [stack@undercloud-0 ~]$ openstack server show vm1
+-------------------------------------+----------------------------------------------------------+
| Field                               | Value                                                    |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                                   |
| OS-EXT-AZ:availability_zone         | nova                                                     |
| OS-EXT-SRV-ATTR:host                | compute-0.redhat.local                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname | compute-0.redhat.local                                   |
| OS-EXT-SRV-ATTR:instance_name       | instance-0000000e                                        |
| OS-EXT-STS:power_state              | Running                                                  |
| OS-EXT-STS:task_state               | None                                                     |
| OS-EXT-STS:vm_state                 | active                                                   |
| OS-SRV-USG:launched_at              | 2020-05-13T13:26:57.000000                               |
| OS-SRV-USG:terminated_at            | None                                                     |
| accessIPv4                          |                                                          |
| accessIPv6                          |                                                          |
| addresses                           | net1=20.0.1.9                                            |
| config_drive                        |                                                          |
| created                             | 2020-05-13T13:26:09Z                                     |
| flavor                              | n1.tiny (52afe22e-fcbb-4844-ab06-27d7eef9cc18)           |
| hostId                              | 27413a59a2eb57e6f2d85bfb910421917c32252a1f63b130a477743b |
| id                                  | 37fbe1ff-d260-4f50-adcc-41f82b00b103                     |
| image                               |                                                          |
| key_name                            | None                                                     |
| name                                | vm1                                                      |
| progress                            | 0                                                        |
| project_id                          | 878743a4cce84671ac45777dca8ca163                         |
| properties                          |                                                          |
| security_groups                     | name='default'                                           |
| status                              | ACTIVE                                                   |
| updated                             | 2020-05-13T13:37:11Z                                     |
| user_id                             | 800e469f62fc4bd9ae23f33ed3f7f61b                         |
| volumes_attached                    | id='93ee3953-e9f9-4e9e-aa66-2c915517061c'                |
+-------------------------------------+----------------------------------------------------------+

###### VM RUNNING ######################


(overcloud) [stack@undercloud-0 ~]$ nova image-create --poll vm1 vm1_snapshot_running

Server snapshotting... 100% complete
Finished
(overcloud) [stack@undercloud-0 ~]$ openstack volume snapshot list
+--------------------------------------+-----------------------------------+----------------------+-----------+------+
| ID                                   | Name                              | Description          | Status    | Size |
+--------------------------------------+-----------------------------------+----------------------+-----------+------+
| 27c99239-56d5-425f-935f-396eab9c2a7b | snapshot for vm1_snapshot_running | Volumen desde Imagen | available |   10 |
+--------------------------------------+-----------------------------------+----------------------+-----------+------+


###### VM PAUSED ######################



(overcloud) [stack@undercloud-0 ~]$ nova pause vm1
(overcloud) [stack@undercloud-0 ~]$ openstack server show vm1
+-------------------------------------+----------------------------------------------------------+
| Field                               | Value                                                    |
+-------------------------------------+----------------------------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                                   |
| OS-EXT-AZ:availability_zone         | nova                                                     |
| OS-EXT-SRV-ATTR:host                | compute-0.redhat.local                                   |
| OS-EXT-SRV-ATTR:hypervisor_hostname | compute-0.redhat.local                                   |
| OS-EXT-SRV-ATTR:instance_name       | instance-0000000e                                        |
| OS-EXT-STS:power_state              | Paused                                                   |
| OS-EXT-STS:task_state               | None                                                     |
| OS-EXT-STS:vm_state                 | paused                                                   |
| OS-SRV-USG:launched_at              | 2020-05-13T13:26:57.000000                               |
| OS-SRV-USG:terminated_at            | None                                                     |
| accessIPv4                          |                                                          |
| accessIPv6                          |                                                          |
| addresses                           | net1=20.0.1.9                                            |
| config_drive                        |                                                          |
| created                             | 2020-05-13T13:26:09Z                                     |
| flavor                              | n1.tiny (52afe22e-fcbb-4844-ab06-27d7eef9cc18)           |
| hostId                              | 27413a59a2eb57e6f2d85bfb910421917c32252a1f63b130a477743b |
| id                                  | 37fbe1ff-d260-4f50-adcc-41f82b00b103                     |
| image                               |                                                          |
| key_name                            | None                                                     |
| name                                | vm1                                                      |
| project_id                          | 878743a4cce84671ac45777dca8ca163                         |
| properties                          |                                                          |
| security_groups                     | name='default'                                           |
| status                              | PAUSED                                                   |
| updated                             | 2020-05-13T13:52:32Z                                     |
| user_id                             | 800e469f62fc4bd9ae23f33ed3f7f61b                         |
| volumes_attached                    | id='93ee3953-e9f9-4e9e-aa66-2c915517061c'                |
+-------------------------------------+----------------------------------------------------------+
(overcloud) [stack@undercloud-0 ~]$ nova image-create --poll vm1 vm1_snapshot_paused

ERROR (Conflict): Cannot 'createImage' instance 37fbe1ff-d260-4f50-adcc-41f82b00b103 while it is in vm_state paused (HTTP 409) (Request-ID: req-f19ad7bd-5018-46eb-a6d0-7e6a2264a8bd)


Actual results:

ERROR (Conflict): Cannot 'createImage' instance 37fbe1ff-d260-4f50-adcc-41f82b00b103 while it is in vm_state paused (HTTP 409) (Request-ID: req-f19ad7bd-5018-46eb-a6d0-7e6a2264a8bd)
(overcloud) [stack@undercloud-0 ~]$ 


Expected results:

Server snapshotting... 100% complete
Finished

Additional info:

nova.api log

2020-05-13 13:53:12.768 20 INFO nova.api.openstack.wsgi [req-f19ad7bd-5018-46eb-a6d0-7e6a2264a8bd 800e469f62fc4bd9ae23f33ed3f7f61b 878743a4cce84671ac45777dca8ca163 - default default] HTTP exception thrown: Cannot 'createImage' instance 37fbe1ff-d260-4f50-adcc-41f82b00b103 while it is in vm_state paused
2020-05-13 13:53:12.769 20 INFO nova.api.openstack.requestlog [req-f19ad7bd-5018-46eb-a6d0-7e6a2264a8bd 800e469f62fc4bd9ae23f33ed3f7f61b 878743a4cce84671ac45777dca8ca163 - default default] 172.17.1.21 "POST /v2.1/servers/37fbe1ff-d260-4f50-adcc-41f82b00b103/action" status: 409 len: 149 microversion: 2.60 time: 0.188771

~~~
virsh dumpxml 37fbe1ff-d260-4f50-adcc-41f82b00b103 

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sda'/>
      <backingStore/>
      <target dev='vda' bus='virtio'/>
      <serial>93ee3953-e9f9-4e9e-aa66-2c915517061c</serial>
      <alias name='virtio-disk0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>

~~~

Comment 7 errata-xmlrpc 2022-09-21 12:10:46 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 (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), 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-2022:6543


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