From 6b5656cb0eb6a526abe7fd1da5dbc258bfe5b7b6 Mon Sep 17 00:00:00 2001 From: Aric Gardner Date: Tue, 28 Jul 2020 14:01:49 -0400 Subject: [PATCH] Fix: openstack image upload defaults to qcow2 Openstack cmd and upload should default to raw not qcow. builds were timing out. Internally ceph is converting from qcow2 to raw. Which can cause the time outs. Issue-ID: RELENG-3102 Signed-off-by: Aric Gardner Change-Id: I78b2fe7bcc6e6f631013cf1d58455cf17cbea291 --- lftools/openstack/cmd.py | 2 +- lftools/openstack/image.py | 2 +- releasenotes/notes/openstack-276ef6e079124325.yaml | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/openstack-276ef6e079124325.yaml diff --git a/lftools/openstack/cmd.py b/lftools/openstack/cmd.py index 6478738e..aa8fdec9 100644 --- a/lftools/openstack/cmd.py +++ b/lftools/openstack/cmd.py @@ -82,7 +82,7 @@ def share(ctx, image, dest): @click.command() @click.argument("image") @click.argument("name", nargs=-1, required=True) -@click.option("--disk-format", type=str, default="qcow2", help="Disk format of image. (default: qcow2)") +@click.option("--disk-format", type=str, default="raw", help="Disk format of image. (default: raw)") @click.pass_context def upload(ctx, image, name, disk_format): """Upload image to OpenStack cloud.""" diff --git a/lftools/openstack/image.py b/lftools/openstack/image.py index b7d31f0c..b37597a6 100644 --- a/lftools/openstack/image.py +++ b/lftools/openstack/image.py @@ -186,7 +186,7 @@ def share(os_cloud, image, clouds): _accept_shared_image(cloud, image_id) -def upload(os_cloud, image, name, disk_format="qcow2"): +def upload(os_cloud, image, name, disk_format="raw"): """Upload image to openstack.""" log.info('Uploading image {} with name "{}".'.format(image, name)) cloud = shade.openstack_cloud(cloud=os_cloud) diff --git a/releasenotes/notes/openstack-276ef6e079124325.yaml b/releasenotes/notes/openstack-276ef6e079124325.yaml new file mode 100644 index 00000000..7b2d4456 --- /dev/null +++ b/releasenotes/notes/openstack-276ef6e079124325.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + The openstack image upload has been updated to default to raw uploads. + This has been done as the LF Openstack cloud provider prefers raw format + and having images uploaded in qcow2 format causes issues with services. + Openstack cmd and upload should default to raw not qcow. -- 2.16.6