Create qcow2 image failed on instance with ephemeral disk when use_cow_images=0

Bug #1641640 reported by Ekaterina Shutova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
Medium
Ekaterina Shutova

Bug Description

Detailed bug description:
 Filed to create qcow2 image on instance with ephemeral disk when use_cow_images set to 0.
Steps to reproduce:
1. Check use_cow_images=0 value in nova config on all computes
2. Start instance with ephemeral disk
3. umount /mnt in instance
4. On instance create qcow2 image with baking_file
   linked to target host device in ephemeral block device
   something like: qemu-img create -f qcow2
   -o backing_file=/dev/sda3,backing_fmt=raw /dev/vdb 20G
5. Change flavor or migrate instance
6. Check that /vdb is not linked to host device
Link to test case:
https://mirantis.testrail.com/index.php?/cases/view/1617642

Expected results:
 Test case passed

Actual result:
Links to failed runs:
https://mirantis.testrail.com/index.php?/tests/view/21296762
https://mirantis.testrail.com/index.php?/tests/view/21282306
 Test case failed with:
command = 'sudo qemu-img create -f qcow2 -o backing_file=/dev/dm-1,backing_fmt=raw /dev/vdb 20G'
verbose = True

    def check_call(self, command, verbose=True):
        ret = self.execute(command, verbose)
        if ret['exit_code'] != 0:
            raise CalledProcessError(command, ret['exit_code'],
> ret['stdout'] + ret['stderr'])

E CalledProcessError: Command 'sudo qemu-img create -f qcow2 -o backing_file=/dev/dm-1,backing_fmt=raw /dev/vdb 20G' returned non-zero exit status 1

E ['sudo: unable to resolve host server-test-ubuntu\n', 'sudo: qemu-img: command not found\n']

Reproducibility:
 100%
Workaround:
 NA
Impact:
 Test run failed.
Description of the environment:
On both Ceph and non-Ceph configuration

Tags: area-nova
Revision history for this message
Ekaterina Shutova (eshutova) wrote :
Changed in mos:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → MOS Nova (mos-nova)
milestone: none → 9.2
Revision history for this message
Timofey Durakov (tdurakov) wrote :

@Ekaterina Shutova, could you please describe steps to reproduce here instead of providing a link to testrail, marking an Incomplete until this bug description is updated

Changed in mos:
status: Confirmed → Incomplete
assignee: MOS Nova (mos-nova) → Ekaterina Shutova (eshutova)
description: updated
Changed in mos:
assignee: Ekaterina Shutova (eshutova) → Timofey Durakov (tdurakov)
status: Incomplete → Confirmed
Revision history for this message
Timofey Durakov (tdurakov) wrote :

It looks like that the issue is related to installing qemu-utils on the instance:
https://github.com/Mirantis/mos-integration-tests/blob/master/mos_tests/nova/nova_test.py#L967-L971
It's a potential race condition when ssh become available before qemu-utils is installed. Trying to reproduce this, to localize root cause.
Setting priority to Medium

Changed in mos:
importance: High → Medium
Revision history for this message
Roman Podoliaka (rpodolyaka) wrote :

I don't think it's a race condition. Based on how the test case looks like:

https://github.com/Mirantis/mos-integration-tests/blob/master/mos_tests/nova/nova_test.py#L967-L971

it's more likely that qemu-utils failed to install (e.g. due to the fact that `apt-get update` wasn't run and apt cache in the cloud image was outdated and pointed to packages that had already been removed from mirrors).

Anyway, it's not a Nova problem. I suggest you check the instance console log when running this test case and at the very least add `apt-get update` call before trying to install qemu-utils package. Also the echoed marker should ideally be only printed when `apt-get install` finished successfully.

Changed in mos:
assignee: Timofey Durakov (tdurakov) → Ekaterina Shutova (eshutova)
status: Confirmed → Incomplete
Revision history for this message
Ekaterina Shutova (eshutova) wrote :

Move to invalid since problem didn't appear since bug creation.

Changed in mos:
status: Incomplete → Invalid
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.