Nova shelve creates duplicated images in cells environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Low
|
Rikimaru Honjo | ||
Mitaka |
Fix Released
|
Low
|
Rikimaru Honjo |
Bug Description
Description
===========
Nova shelve creates duplicated images in cells environment.
I think, this behavior is caused by below patch.
(not reproduced in icehouse version)
commit 394ac5eea215831
I modified source code like below, and restart nova-api. It seems working fine.
diff --git a/nova/
index 175ece2..4fe44a3 100644
--- a/nova/
+++ b/nova/
@@ -322,8 +322,6 @@ class ComputeCellsAPI
@check_
def shelve(self, context, instance, clean_shutdown=
"""Shelve the given instance."""
- super(ComputeCe
- clean_shutdown=
Steps to reproduce
==================
1. Create cells environment (ex. using devstack)
2. Create vm by Nova
openstack@
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| a520a4a7-
+------
3. Execute nova shelve to vm
openstack@
openstack@
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| a520a4a7-
+------
4. Two images which is named <vmname>-shelved are created in glance
openstack@
+------
| ID | Name |
+------
| 3a106d4e-
| ffc958ac-
| 51378b3f-
| 42a6f2b0-
| cc06acba-
+------
5. Only an glance image is used for nova-shelve.
openstack@
+------
| Property | Value |
+------
| base_image_ref | 3a106d4e-
| checksum | None |
| container_format | ami |
| created_at | 2016-06-
| disk_format | ami |
| id | 42a6f2b0-
| image_type | snapshot |
| instance_uuid | a520a4a7-
| kernel_id | ffc958ac-
| min_disk | 1 |
| min_ram | 0 |
| name | test-vm-shelved |
| owner | 73af4afafeae4d5
| protected | False |
| ramdisk_id | 51378b3f-
| size | 0 |
| status | queued |
| tags | [] |
| updated_at | 2016-06-
| user_id | c4954683e8244a0
| virtual_size | None |
| visibility | private |
+------
openstack@
+------
| Property | Value |
+------
| base_image_ref | 3a106d4e-
| checksum | ac94fabcc66952b
| container_format | ami |
| created_at | 2016-06-
| disk_format | ami |
| id | cc06acba-
| image_location | snapshot |
| image_state | available |
| image_type | snapshot |
| instance_uuid | a520a4a7-
| kernel_id | ffc958ac-
| min_disk | 1 |
| min_ram | 0 |
| name | test-vm-shelved |
| owner | 73af4afafeae4d5
| owner_id | 73af4afafeae4d5
| protected | False |
| ramdisk_id | 51378b3f-
| size | 10682368 |
| status | active |
| tags | [] |
| updated_at | 2016-06-
| user_id | c4954683e8244a0
| virtual_size | None |
| visibility | private |
+------
Expected result
===============
* Only an image is created
openstack@
+------
| ID | Name |
+------
| 3a106d4e-
| ffc958ac-
| 51378b3f-
| cc06acba-
+------
Actual result
=============
* Duplicated image is created on glance
openstack@
+------
| ID | Name |
+------
| 3a106d4e-
| ffc958ac-
| 51378b3f-
| 42a6f2b0-
| cc06acba-
+------
Environment
===========
* Devstack with cell
** This is snippet of localrc
ENABLED_
* nova version
** This is on stable/liberty
git log -1
c5d0d2d0f4940d2
Logs & Configs
==============
* Duplicated image is created on nova-api
2016-06-03 02:16:32.537 DEBUG glanceclient.
52cf85f625b8009
-image_type: snapshot' -H 'X-User-Id: c4954683e8244a0
erty-ramdisk_id: 51378b3f-
e_image_ref: 3a106d4e-
2016-06-03 02:16:32.770 DEBUG glanceclient.
HTTP/1.1 201 Created
Content-Length: 755
Connection: keep-alive
Location: http://
Date: Fri, 03 Jun 2016 06:16:32 GMT
Content-Type: application/json
X-Openstack-
{"image": {"status": "queued", "deleted": false, "container_format": "ami", "min_ram": 0, "updated_at": "2016-06-
": "42a6f2b0-
1-885a-
84-990a-
* nova-cell(child) also creates the image
2016-06-03 02:16:32.973 DEBUG glanceclient.
52cf85f625b8009
-image_type: snapshot' -H 'X-User-Id: c4954683e8244a0
erty-ramdisk_id: 51378b3f-
e_image_ref: 3a106d4e-
rom (pid=31995) log_curl_request /usr/lib/
2016-06-03 02:16:33.045 DEBUG glanceclient.
HTTP/1.1 201 Created
Content-Length: 755
Connection: keep-alive
Location: http://
Date: Fri, 03 Jun 2016 06:16:33 GMT
Content-Type: application/json
X-Openstack-
{"image": {"status": "queued", "deleted": false, "container_format": "ami", "min_ram": 0, "updated_at": "2016-06-
": "cc06acba-
1-885a-
84-990a-
* Config
** set 'glanceclient=
nova-cells.conf
[DEFAULT]
default_
description: | updated |
Changed in nova: | |
assignee: | nobody → Vipul Nayyar (vipulnayyar) |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
assignee: | Vipul Nayyar (vipulnayyar) → nobody |
Changed in nova: | |
assignee: | nobody → Ryo Miki (miki-ryo-e) |
Changed in nova: | |
assignee: | Ryo Miki (miki-ryo-e) → nobody |
Changed in nova: | |
assignee: | nobody → Rikimaru Honjo (honjo-rikimaru-c6) |
For the most part we've said we won't fix latent bugs in cells v1:
http:// docs.openstack. org/developer/ nova/cells. html#status
However, this looks like a regression and potentially trivial fix, so we should let it in.