Bug 1882649 - IPI installer labels all images it uploads into glance as qcow2
Summary: IPI installer labels all images it uploads into glance as qcow2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.7.0
Assignee: Mike Fedosin
QA Contact: weiwei jiang
URL:
Whiteboard:
: 1888615 1889304 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-25 09:15 UTC by Pierre Prinetti
Modified: 2021-02-24 15:22 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:21:14 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4279 0 None closed Bug 1882649: Determine Glance disk format based on file extension 2020-11-09 02:19:22 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:22:07 UTC

Description Pierre Prinetti 2020-09-25 09:15:20 UTC
Initially reported by August Simonelli on Jira (https://issues.redhat.com/browse/OSASINFRA-1267).

---

I need to use a RAW image for my ceph-backed glance.

I set 

{noformat}
$ export OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/
latest/rhcos-43.81.202001142154.0-metal.x86_64.raw.gz
{noformat}


and confirm


{noformat}
$ echo $OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE
https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/latest/rhcos-43.81.202001142154.0-metal.x86_64.raw.gz
{noformat}


And run the install. 


{noformat}
$ openshift-install --dir=ocpra create cluster --log-level=debug
{noformat}


I see the relevant messages in my debug output:


{noformat}
...
WARNING Found override for OS Image. Please be warned, this is not advised
...
DEBUG Generating Terraform Variables...
INFO Obtaining RHCOS image file from 'https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/latest/rhcos-43.81.202001142154.0-metal.x86_64.raw.gz'
DEBUG Unpacking file into "/home/stack/.cache/openshift-installer/image_cache/bda2298396830f36c18db95b1a76c537"...
DEBUG content type of /home/stack/.cache/openshift-installer/image_cache/bda2298396830f36c18db95b1a76c537 is application/x-gzip
DEBUG Creating a Swift container for your bootstrap ignition...
DEBUG Container ocpra-4dgcd was created.
{noformat}

...

image is created


{noformat}
$ openstack image list
+--------------------------------------+-------------------+--------+
| ID                                   | Name              | Status |
+--------------------------------------+-------------------+--------+
| 5856e409-2c7b-4d60-80b2-39f60e243283 | ocpra-4dgcd-rhcos | active |
+--------------------------------------+-------------------+--------+
{noformat}


but looking deeper at it


{noformat}
$ openstack image show ocpra-4dgcd-rhcos
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                                                                                                                                                             |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum         | 344a137e12336502fc1009b09b3094f2                                                                                                                                                                                                                  |
| container_format | bare                                                                                                                                                                                                                                              |
| created_at       | 2020-02-10T05:58:54Z                                                                                                                                                                                                                              |
| disk_format      | qcow2                                                                                                                                                                                                                                             |
| file             | /v2/images/5856e409-2c7b-4d60-80b2-39f60e243283/file                                                                                                                                                                                              |
| id               | 5856e409-2c7b-4d60-80b2-39f60e243283                                                                                                                                                                                                              |
| min_disk         | 0                                                                                                                                                                                                                                                 |
| min_ram          | 0                                                                                                                                                                                                                                                 |
| name             | ocpra-4dgcd-rhcos                                                                                                                                                                                                                                 |
| owner            | 798f35d95f1c43a9bb4e5dd27f50777f                                                                                                                                                                                                                  |
| properties       | direct_url='rbd://1062d15a-3806-11ea-a2f6-525400f34daa/images/5856e409-2c7b-4d60-80b2-39f60e243283/snap', locations='[{u'url': u'rbd://1062d15a-3806-11ea-a2f6-525400f34daa/images/5856e409-2c7b-4d60-80b2-39f60e243283/snap', u'metadata': {}}]' |
| protected        | False                                                                                                                                                                                                                                             |
| schema           | /v2/schemas/image                                                                                                                                                                                                                                 |
| size             | 3340763136                                                                                                                                                                                                                                        |
| status           | active                                                                                                                                                                                                                                            |
| tags             | openshiftClusterID=ocpra-4dgcd                                                                                                                                                                                                                    |
| updated_at       | 2020-02-10T05:59:39Z                                                                                                                                                                                                                              |
| virtual_size     | None                                                                                                                                                                                                                                              |
| visibility       | private                                                                                                                                                                                                                                           |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

{noformat}

noting


{noformat}
| disk_format      | qcow2     
{noformat}


but

when i look at the downloaded file


{noformat}
$ qemu-img info /home/stack/.cache/openshift-installer/image_cache/bda2298396830f36c18db95b1a76c537
image: /home/stack/.cache/openshift-installer/image_cache/bda2298396830f36c18db95b1a76c537
file format: raw
virtual size: 3.1G (3340763136 bytes)
disk size: 3.1G
{noformat}


So it seems like the installer is setting all images it uploads to qcow2.

I can reproduce this behaviour by using the openstack cli directly on the downloaded image, which i know is raw, but i set with --disk-format qcow2


{noformat}
[stack@undercloud image_cache]$ openstack image create --disk-format qcow2 --container-format bare --file bda2298396830f36c18db95b1a76c537 raw-as-qcow
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                                                                                                                                                             |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum         | 344a137e12336502fc1009b09b3094f2                                                                                                                                                                                                                  |
| container_format | bare                                                                                                                                                                                                                                              |
| created_at       | 2020-02-10T05:44:33Z                                                                                                                                                                                                                              |
| disk_format      | qcow2                                                                                                                                                                                                                                             |
| file             | /v2/images/506dd3ee-af9a-4673-b008-50ac6ca697a5/file                                                                                                                                                                                              |
| id               | 506dd3ee-af9a-4673-b008-50ac6ca697a5                                                                                                                                                                                                              |
| min_disk         | 0                                                                                                                                                                                                                                                 |
| min_ram          | 0                                                                                                                                                                                                                                                 |
| name             | raw-as-qcow                                                                                                                                                                                                                                       |
| owner            | 798f35d95f1c43a9bb4e5dd27f50777f                                                                                                                                                                                                                  |
| properties       | direct_url='rbd://1062d15a-3806-11ea-a2f6-525400f34daa/images/506dd3ee-af9a-4673-b008-50ac6ca697a5/snap', locations='[{u'url': u'rbd://1062d15a-3806-11ea-a2f6-525400f34daa/images/506dd3ee-af9a-4673-b008-50ac6ca697a5/snap', u'metadata': {}}]' |
| protected        | False                                                                                                                                                                                                                                             |
| schema           | /v2/schemas/image                                                                                                                                                                                                                                 |
| size             | 3340763136                                                                                                                                                                                                                                        |
| status           | active                                                                                                                                                                                                                                            |
| tags             |                                                                                                                                                                                                                                                   |
| updated_at       | 2020-02-10T05:45:02Z                                                                                                                                                                                                                              |
| virtual_size     | None                                                                                                                                                                                                                                              |
| visibility       | shared                                                                                                                                                                                                                                            |
+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
{noformat}

I know the image uploaded is RAW, but it's confusing cause it calls it qcow2.

Comment 3 Martin André 2020-10-19 10:18:00 UTC
*** Bug 1888615 has been marked as a duplicate of this bug. ***

Comment 4 Mike Fedosin 2020-10-19 11:00:27 UTC
*** Bug 1889304 has been marked as a duplicate of this bug. ***

Comment 6 weiwei jiang 2020-11-09 10:01:11 UTC
Checked with OpenShift Installer 4.7.0-0.nightly-2020-10-27-051128

### with install-config way:
# install-config.yaml
---
...
platform:
  openstack:
    cloud: openstack
    computeFlavor: m1.xlarge
    region: regionOne
    trunkSupport: '1'
    octaviaSupport: '0'
    lbFloatingIP: 10.0.102.188
    ingressFloatingIP: 10.0.101.207
    externalNetwork: provider_net_cci_8
    clusterOSImage: https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/latest/rhcos-4.6.0-rc.4-x86_64-metal4k.x86_64.raw.gz
...

# ./openshift-install create cluster --dir '/home/jenkins/workspace/Launch Environment Flexy/workdir/install-dir' --log-level=debug
...
level=info msg=Obtaining RHCOS image file from 'https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/latest/rhcos-4.6.0-rc.4-x86_64-metal4k.x86_64.raw.gz'
level=debug msg=Unpacking file into "/home/jenkins/.cache/openshift-installer/image_cache/9de136efbaf93f08713b72c828be61ec"...
level=debug msg=decompressing the image archive as gz
level=debug msg=Creating a Glance image for RHCOS...
level=debug msg=Image wj47ios1109a-tl67s-rhcos was created.
level=debug msg=Using legacy API to upload RHCOS to the image "wj47ios1109a-tl67s-rhcos" with ID "db46a5b2-e7b5-4245-9438-769a15b59200"
level=debug msg=The data was uploaded.


# openstack image show wj47ios1109a-tl67s-rhcos
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                                                                                                                                                                 |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum         | a83b2d51c78f3b58a716b5a8a266dedd                                                                                                                                                                                                                      |
| container_format | bare                                                                                                                                                                                                                                                  |
| created_at       | 2020-11-09T07:49:01Z                                                                                                                                                                                                                                  |
| disk_format      | qcow2                                                                                                                                                                                                                                                 |
| file             | /v2/images/db46a5b2-e7b5-4245-9438-769a15b59200/file                                                                                                                                                                                                  |
| id               | db46a5b2-e7b5-4245-9438-769a15b59200                                                                                                                                                                                                                  |
| min_disk         | 0                                                                                                                                                                                                                                                     |
| min_ram          | 0                                                                                                                                                                                                                                                     |
| name             | wj47ios1109a-tl67s-rhcos                                                                                                                                                                                                                              |
| owner            | 542c6ebd48bf40fa857fc245c7572e30                                                                                                                                                                                                                      |
| properties       | direct_url='rbd://03e3321d-071f-4b28-a3f9-0256f384bdca/images_d/db46a5b2-e7b5-4245-9438-769a15b59200/snap', locations='[{u'url': u'rbd://03e3321d-071f-4b28-a3f9-0256f384bdca/images_d/db46a5b2-e7b5-4245-9438-769a15b59200/snap', u'metadata': {}}]' |
| protected        | False                                                                                                                                                                                                                                                 |
| schema           | /v2/schemas/image                                                                                                                                                                                                                                     |
| size             | 3553624064                                                                                                                                                                                                                                            |
| status           | active                                                                                                                                                                                                                                                |
| tags             | openshiftClusterID=wj47ios1109a-tl67s                                                                                                                                                                                                                 |
| updated_at       | 2020-11-09T07:49:50Z                                                                                                                                                                                                                                  |
| virtual_size     | None                                                                                                                                                                                                                                                  |
| visibility       | shared                                                                                                                                                                                                                                                |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

### with environment variable override way:

# export OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE=https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/latest/rhcos-4.6.0-rc.4-x86_64-metal4k.x86_64.raw.gz

# ./openshift-install create cluster --dir '/home/jenkins/workspace/Launch Environment Flexy/workdir/install-dir' --log-level=debug
...
level=info msg=Obtaining RHCOS image file from 'https://mirror.openshift.com/pub/openshift-v4/dependencies/rhcos/pre-release/latest/rhcos-4.6.0-rc.4-x86_64-metal4k.x86_64.raw.gz'
level=debug msg=Unpacking file into "/home/jenkins/.cache/openshift-installer/image_cache/9de136efbaf93f08713b72c828be61ec"...
level=debug msg=decompressing the image archive as gz
level=debug msg=Creating a Glance image for RHCOS...
level=debug msg=Image wj47ios1109b-p58g8-rhcos was created.
level=debug msg=Using legacy API to upload RHCOS to the image "wj47ios1109b-p58g8-rhcos" with ID "e9589a6f-10c4-48a7-a0f2-28a119f5ac52"
level=debug msg=The data was uploaded.
...

# openstack image show wj47ios1109b-p58g8-rhcos
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field            | Value                                                                                                                                                                                                                                                 |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| checksum         | a83b2d51c78f3b58a716b5a8a266dedd                                                                                                                                                                                                                      |
| container_format | bare                                                                                                                                                                                                                                                  |
| created_at       | 2020-11-09T09:00:24Z                                                                                                                                                                                                                                  |
| disk_format      | qcow2                                                                                                                                                                                                                                                 |
| file             | /v2/images/e9589a6f-10c4-48a7-a0f2-28a119f5ac52/file                                                                                                                                                                                                  |
| id               | e9589a6f-10c4-48a7-a0f2-28a119f5ac52                                                                                                                                                                                                                  |
| min_disk         | 0                                                                                                                                                                                                                                                     |
| min_ram          | 0                                                                                                                                                                                                                                                     |
| name             | wj47ios1109b-p58g8-rhcos                                                                                                                                                                                                                              |
| owner            | 542c6ebd48bf40fa857fc245c7572e30                                                                                                                                                                                                                      |
| properties       | direct_url='rbd://03e3321d-071f-4b28-a3f9-0256f384bdca/images_d/e9589a6f-10c4-48a7-a0f2-28a119f5ac52/snap', locations='[{u'url': u'rbd://03e3321d-071f-4b28-a3f9-0256f384bdca/images_d/e9589a6f-10c4-48a7-a0f2-28a119f5ac52/snap', u'metadata': {}}]' |
| protected        | False                                                                                                                                                                                                                                                 |
| schema           | /v2/schemas/image                                                                                                                                                                                                                                     |
| size             | 3553624064                                                                                                                                                                                                                                            |
| status           | active                                                                                                                                                                                                                                                |
| tags             | openshiftClusterID=wj47ios1109b-p58g8                                                                                                                                                                                                                 |
| updated_at       | 2020-11-09T09:01:17Z                                                                                                                                                                                                                                  |
| virtual_size     | None                                                                                                                                                                                                                                                  |
| visibility       | shared                                                                                                                                                                                                                                                |
+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

Comment 9 errata-xmlrpc 2021-02-24 15:21:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.