The reason of the flag is, after all images are forced
to be raw because of security reason
(https://bugs.launchpad.net/nova/+bug/853330), this flag
is added later so that deployer can still select using raw images or
compressed images.
Currently this flag is used in the deeper of functions like image_to_raw() or
converted_size(). For example, image_to_raw() will convert the image
to be raw format only if the force_raw_image flag is set, that means
the caller totally have no idea if the image returned is a raw image or not.
This is possibly ok for libvirt since libvirt does not care for qcow2
or raw, but it's different for ironic, since we will take different action
for qcow2/raw format. A flag in such deeper layer is not so good.
This patch changes these functions, so that the caller in image cache level
accept parameter from deploy level like iscsi_deploy or pxe, which make
decision based on the config.
Reviewed: https:/ /review. openstack. org/130880 /git.openstack. org/cgit/ openstack/ ironic/ commit/ ?id=37f1528d9fb b2bbe588c26225b b29830d1e58386
Committed: https:/
Submitter: Jenkins
Branch: master
commit 37f1528d9fbb2bb e588c26225bb298 30d1e58386
Author: yunhong jiang <email address hidden>
Date: Thu Oct 23 04:49:57 2014 -0700
Change the force_raw_image config usage
The force_raw_image comes from nova side as a /bugs.launchpad .net/nova/ +bug/1383465.
fix for https:/
The reason of the flag is, after all images are forced /bugs.launchpad .net/nova/ +bug/853330), this flag
to be raw because of security reason
(https:/
is added later so that deployer can still select using raw images or
compressed images.
Currently this flag is used in the deeper of functions like image_to_raw() or size(). For example, image_to_raw() will convert the image
converted_
to be raw format only if the force_raw_image flag is set, that means
the caller totally have no idea if the image returned is a raw image or not.
This is possibly ok for libvirt since libvirt does not care for qcow2
or raw, but it's different for ironic, since we will take different action
for qcow2/raw format. A flag in such deeper layer is not so good.
This patch changes these functions, so that the caller in image cache level
accept parameter from deploy level like iscsi_deploy or pxe, which make
decision based on the config.
Change-Id: I118c9d8edcc13d 15762593c254eaf 27792d6c55f
Related-Bug: #1382164