Compute node convert qcow2 to raw even if force_raw_images=false

Bug #1774730 reported by hamza
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

Using openstack queen version:

Uploaded qcow2 image to glance

openstack image create --disk-format=qcow2 --container-format=bare --file img/ylinux-7.4.4_236.qcow2 ylinux-7.4.4

and created an instance

openstack server create test_queens_f --flavor small --image ylinux-7.4.4

After creating the image and try to create an instance
The selected Compute node will download the image from glance and
Convert it using the command
qemu-img convert -t none -O raw -f qcow2 {file} {file}
to produce a RAW image from qcow2

although in the configuration we set:
use_cow_images = true
force_raw_images = false
images_type = qcow2

in nova.conf and nova-compute.conf

i think using the options above should stop the convert to RAW

Revision history for this message
jichenjc (jichenjc) wrote :

maybe you can put some log and whole configuration file to help analysis?

just a quick check and not sure where's the convert -t called, so a debug log might be much helpful to know where's root cause

Revision history for this message
hamza (alqtaishat) wrote :

Attached the nova configuration

The convert command line from

https://github.com/openstack/nova/blob/stable/queens/nova/virt/images.py#L136

Revision history for this message
hamza (alqtaishat) wrote :
James Penick (penick)
summary: - Compute node convert qcow2 to raw even force_raw_images=false
+ Compute node convert qcow2 to raw even if force_raw_images=false
Revision history for this message
snake19880906 (snake19880906) wrote :

I use pike environment and use cirros image
(1)create a vm
(2) not find your question.

[root@pike ~]# vim /usr/lib/python2.7/site-packages/nova/conf/compute.py
[root@pike ~]# glance image-list
+--------------------------------------+----------------+
| ID | Name |
+--------------------------------------+----------------+
| c780a38b-b1dc-41ac-9d9a-7b74cb385c75 | cirros |
| 40f93d8a-b07f-4728-b1c9-fa1559a651fe | download-image |
+--------------------------------------+----------------+
[root@pike ~]# glance image-show c780a38b-b1dc-41ac-9d9a-7b74cb385c75
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | f8ab98ff5e73ebab884d80c9dc9c7290 |
| container_format | bare |
| created_at | 2018-01-05T03:42:06Z |
| disk_format | qcow2 |
| id | c780a38b-b1dc-41ac-9d9a-7b74cb385c75 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | 5f15a3fa2c4a4eed874d319e0e600085 |
| protected | False |
| size | 13267968 |
| status | active |
| tags | [] |
| updated_at | 2018-01-05T03:42:06Z |
| virtual_size | None |
| visibility | public |

[root@pike ~]# cd /var/lib/nova/instances/c32f8edc-cb33-4f0a-a0f2-553b338d9a4d/
[root@pike c32f8edc-cb33-4f0a-a0f2-553b338d9a4d]# ls -l
total 2760
-rw------- 1 root root 0 Jan 23 13:58 console.log
-rw-r--r-- 1 root root 2818048 Feb 7 16:10 disk
-rw-r--r-- 1 nova nova 79 Jan 5 13:47 disk.info
[root@pike c32f8edc-cb33-4f0a-a0f2-553b338d9a4d]# qemu-img info disk
image: disk
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 2.7M
cluster_size: 65536
backing file: /var/lib/nova/instances/_base/c33e0050502ac68c2f6cd5b3435db1993a7dfa7b
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false
[root@pike c32f8edc-cb33-4f0a-a0f2-553b338d9a4d]# cd ..
[root@pike instances]# cd efd030ba-4304-4f1c-b95b-bb16a361ae9a/
[root@pike efd030ba-4304-4f1c-b95b-bb16a361ae9a]# ls -l
total 2788
-rw------- 1 root root 25067 Jan 5 13:56 console.log
-rw-r--r-- 1 root root 2818048 Feb 7 16:09 disk
-rw-r--r-- 1 nova nova 79 Jan 5 13:55 disk.info
[root@pike efd030ba-4304-4f1c-b95b-bb16a361ae9a]# qemu-img info disk
image: disk
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 2.7M
cluster_size: 65536
backing file: /var/lib/nova/instances/_base/c33e0050502ac68c2f6cd5b3435db1993a7dfa7b
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Revision history for this message
hamza (alqtaishat) wrote :

I think the qemu-img convert am talking about is used to generate backing file

qemu-img info /openstack/nova/instances/b0dc644d-6f10-4736-806c-946d5649a0be/disk
image: /openstack/nova/instances/b0dc644d-6f10-4736-806c-946d5649a0be/disk
file format: qcow2
virtual size: 25G (26843545600 bytes)
disk size: 308M
cluster_size: 65536
backing file: /openstack/nova/instances/_base/95aa9859731c56d3773d954c1ef0fb45ce8ad799
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

qemu-img info /openstack/nova/instances/_base/95aa9859731c56d3773d954c1ef0fb45ce8ad799
image: /openstack/nova/instances/_base/95aa9859731c56d3773d954c1ef0fb45ce8ad799
file format: raw
virtual size: 5.0G (5368709120 bytes)
disk size: 3.7G

Revision history for this message
snake19880906 (snake19880906) wrote :

_base_dir_file is base image data. a image hava a base image data in a compute node(_base)
you set use_cow_images=true, each image have a base data mirroring and incremental data.

tags: added: compute
melanie witt (melwitt)
tags: added: libvirt
Revision history for this message
melanie witt (melwitt) wrote :

Our imagebackend expert mdbooth had a look through the code and didn't immediately see any issues, so we're going to need more information to track this down.

Can you share the entire nova.conf on the compute node (with sensitive information removed) and the debug log from the compute node when the problem happened?

Changed in nova:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.