[Openstack] [Nova][Glance] Nova imports flat images from base file despite ceph backend
Eugen Block
eblock at nde.ag
Wed Jan 2 13:39:23 UTC 2019
Hello and a happy new year!
I need to reopen this thread because there are still things going on
that I don't fully understand. I changed the disk_format of all the
images that were affected by my mistake a couple of weeks ago. I
deleted the base files in /var/lib/nova/instances/_base and launched
new instances, leading to expected cow clones:
---cut here---
control:~ # openstack image show 5f486361-5468-42a0-9993-9cdda3450b0e
| grep disk_format
| disk_format | raw|
control:~ # rbd children images/5f486361-5468-42a0-9993-9cdda3450b0e at snap
images/029bfb90-cbab-4a7c-a51c-27807ab41ce7_disk
images/ccd4498f-c0a0-480a-ab4b-6224d63e78fa_disk
images/d5379918-40a0-4119-9e47-773c0ab8c0f3_disk
---cut here---
These are only three clones, but I have 16 instances based on the same image:
---cut here---
+--------------------------------------+
| uuid |
+--------------------------------------+
| 87dfbb4f-784d-4390-a0c9-d3162a56ea7e |
| bb56995d-d3ea-464d-94fe-382880bf2a92 |
| d4fde2fe-140e-4904-90e8-996cc418302d |
| 7bd4fdc0-d6b7-47cb-adb3-324abff6a0e5 |
| bef8e4fe-b2f4-44f5-a144-36ced37007ac |
| bcc005fc-fa12-4dd9-b531-cbccfb7c426a |
###| ccd4498f-c0a0-480a-ab4b-6224d63e78fa |
###| 029bfb90-cbab-4a7c-a51c-27807ab41ce7 |
###| d5379918-40a0-4119-9e47-773c0ab8c0f3 |
| abd2c0bc-2e66-4e2a-9f4c-f006937c7b27 |
| e07c0f5e-403e-4ad3-b04f-fb306e99869e |
| edec4aa0-9459-4444-bbb8-03097bccba4c |
| ca4449f5-921d-4ce5-8559-fc719cfbc845 |
| 8bff1799-391e-4620-9b11-134962084b84 |
| 9d927ac4-d7d3-45cb-8628-b267a6d0e668 |
| 54cfeede-44f9-49bd-9f49-ef4dcacff953 |
+--------------------------------------+
---cut here---
Those three cow clones were created after adjusting the disk_format,
some of the rest were created before the changes, the others have been
created after the changes. Can anyone explain why a new base image is
created?
I downloaded the glance image and double-checked the file format, I
also exported the snapshot which should be used to create clones,
there's only one discrepancy (disk size), but I don't think this could
be relevant:
---cut here---
control:~ # qemu-img info /var/lib/glance/images/image-snap.img
image: /var/lib/glance/images/image-snap.img
file format: raw
virtual size: 5.0G (5368709120 bytes)
disk size: 2.5G
control:~ # qemu-img info /var/lib/glance/images/image.img
image: /var/lib/glance/images/image.img
file format: raw
virtual size: 5.0G (5368709120 bytes)
disk size: 5.0G
control:~ # md5sum /var/lib/glance/images/image.img
b9b28dd300a6fbb1de2081f1cb8a07d0 /var/lib/glance/images/image.img
control:~ # md5sum /var/lib/glance/images/image-snap.img
b9b28dd300a6fbb1de2081f1cb8a07d0 /var/lib/glance/images/image-snap.img
---cut here---
I also tried to find something with the glance-cache-manage cli, but I
can't even connect to that service, I guess it has never been used.
control:~ # glance-cache-manage list-cached
Failed to show cached images. Got error:
Connect error/bad request to Auth service at URL
http://control1.cloud.hh.nde.ag:5000/v3/tokens.
I don't know how to fix that yet, but could this be a way to resolve
that issue?
Regards,
Eugen
Zitat von melanie witt <melwittt at gmail.com>:
> On Fri, 12 Oct 2018 20:06:04 -0700, Remo Mattei wrote:
>> I do not have it handy now but you can verify that the image is
>> indeed raw or qcow2
>>
>> As soon as I get home I will dig the command and pass it on. I have
>> seen where images have extensions thinking it is raw and it is not.
>
> You could try 'qemu-img info <image>' and get output like this,
> notice "file format":
>
> $ qemu-img info test.vmdk
> (VMDK) image open: flags=0x2 filename=test.vmdk
> image: test.vmdk
> file format: vmdk
> virtual size: 20M (20971520 bytes)
> disk size: 17M
>
> [1] https://en.wikibooks.org/wiki/QEMU/Images#Getting_information
>
> -melanie
>
>
>
>
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
More information about the openstack-discuss
mailing list