Bug 1838671 - [OSP 13z13]Error creating snapshot from instance when vm is paused and instance is booted from volume
Summary: [OSP 13z13]Error creating snapshot from instance when vm is paused and instan...
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: z13
: 13.0 (Queens)
Assignee: Lee Yarwood
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On: 1835292 1838668 1838669
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-21 14:31 UTC by Lee Yarwood
Modified: 2023-03-21 19:31 UTC (History)
13 users (show)

Fixed In Version: openstack-nova-17.0.13-15.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1838669
Environment:
Last Closed: 2020-10-28 18:32:07 UTC
Target Upstream Version:
Embargoed:
alisci: needinfo-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-3584 0 None None None 2022-08-23 10:39:46 UTC
Red Hat Product Errata RHBA-2020:4393 0 None None None 2020-10-28 18:32:30 UTC

Description Lee Yarwood 2020-05-21 14:31:14 UTC
+++ This bug was initially created as a clone of Bug #1838669 +++

+++ This bug was initially created as a clone of Bug #1838668 +++

+++ This bug was initially created as a clone of Bug #1835292 +++

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 8 errata-xmlrpc 2020-10-28 18:32:07 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 (openstack-nova bug fix 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/RHBA-2020:4393


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