I tried a test with an older version of qemu-img in devstack and found that if the version of qemu-img does not recognize the --force-share flag, it will anyway return 0, so that explains how the bug reporter saw "returned 0" and still got the failure:
$ qemu-img info --force-share /opt/stack/data/nova/instances/_base/3d3fa687799a973799cb7f263839457ba63c3e2f
info: unrecognized option '--force-share'
qemu-img version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.31), Copyright (c) 2004-2008 Fabrice Bellard
usage: qemu-img command [command options]
QEMU disk image utility
...
$ echo $?
0
We have code that checks for the qemu version to determine whether or not the --force-share flag is available:
I tried a test with an older version of qemu-img in devstack and found that if the version of qemu-img does not recognize the --force-share flag, it will anyway return 0, so that explains how the bug reporter saw "returned 0" and still got the failure:
$ qemu-img info --force-share /opt/stack/ data/nova/ instances/ _base/3d3fa6877 99a973799cb7f26 3839457ba63c3e2 f 5ubuntu10. 31), Copyright (c) 2004-2008 Fabrice Bellard
info: unrecognized option '--force-share'
qemu-img version 2.5.0 (Debian 1:2.5+dfsg-
usage: qemu-img command [command options]
QEMU disk image utility
...
$ echo $?
0
We have code that checks for the qemu version to determine whether or not the --force-share flag is available:
https:/ /github. com/openstack/ nova/blob/ stable/ queens/ nova/virt/ images. py#L49- L72
but somehow, that check is not working properly and is sending the --force-share flag anyway.