Please add custom_properties support similar to simplestreams-sync

Bug #1994053 reported by Alan Baghumian
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Charm Guide
Fix Released
Undecided
Rafael Lopez
OpenStack Glance Charm
Fix Committed
Wishlist
Rafael Lopez
2023.1
Fix Released
Undecided
Unassigned
Yoga
Fix Released
Undecided
Unassigned
Zed
Fix Released
Undecided
Unassigned

Bug Description

Hello!

It would be great if we have a custom_properties configuration option similar to glance-simplestreams-sync (1).

This would make life much easier to set some properties as default and not having to figure out a way to post-process uploaded images in glace to set desired "default" properties for a given environment.

Please let me know if you have any questions.

Thank you.

(1) https://charmhub.io/glance-simplestreams-sync/configure

Revision history for this message
Walid Moghrabi (walid-fdj) wrote (last edit ):

Hi,

This one is a typical example of lack of consistency.
You have 3 charms here dealing with images in Glance :
* glance charm itself
* glance-simplestreams-sync
* octavia-diskimage-retrofit

These 3 charms have their own sets of options regarding image properties/conversion and there is no way to have a consistent behavior.

1) with glance, there is a "image-conversion" option in order to force conversion to raw format that is apparently doing its job *but only when the image is uploaded through CLI or Horizon dashboard* ! Images uploaded by glance-simplestreams-sync or octavia-diskimage-retrofit are *not* converted as if they can bypass this option (which is configured at the glance level so I don't even know how they can do that).

2) glance charm has no option to configure custom image properties (such as hw properties for virtio drivers, qemu-guest-agent support, ...). This is something that is supported by glance through the image property injection plugin (image_import_plugins ) which basically relies on the same principles as image conversion plugin (where we do have a charm option available). So custom properties has to be set afterwards which can easily be done with a controlled process (pipelines, whatever ...) but in some situations (where a user can upload his own custom image), we could be in some corner case where some instances could be spawned without the properties we need.

3) glance-simplestreams-sync on the other hand *has* options to set custom properties for images *but* ... no option to do image conversion, files are uploaded as qcow which is not efficient when used with a ceph storage backend for example.

4) octavia-diskimage-retrofit has no option for both custom properties and conversion ... even though the retrofit process is based on the images uploaded by glance-simplestreams-sync (which have their own set of custom properties but those properties are not inherited by the retrofited image).

This is pure mess, can't we just have options to add default custom properties and do image conversion at the glance level and have every other "image uploader" charms such as glance-simplestreams-sync and octavia-diskimage-retrofit just comply to these rules by not doing things their own way ?
Or maybe have some hierarchical layering with image uploading charms to override or add their own options on top of what is defined at the glance level but without bypassing them ?

The current situation is just illogical and inconsistent.

Changed in charm-glance:
assignee: nobody → Rafael Lopez (rafael.lopez)
Changed in charm-glance:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (master)
Changed in charm-glance:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (master)

Reviewed: https://review.opendev.org/c/openstack/charm-glance/+/875797
Committed: https://opendev.org/openstack/charm-glance/commit/0a1d645000576e5ccbc723614e0610eeffd29935
Submitter: "Zuul (22348)"
Branch: master

commit 0a1d645000576e5ccbc723614e0610eeffd29935
Author: Rafael Lopez <email address hidden>
Date: Wed Mar 1 01:32:01 2023 +0000

    Add configuration option for custom image properties

    Added configuration for injecting default image properties using the
    interoperable image import process. This change adds 1 configuration
    option to the charm:
    - 'custom-import-properties' to specify the desired custom properties

    Note: current glance docs example shows incorrect quoting, the
    implemented format in this change (no quotes) is correct. Docs fix
    in: https://review.opendev.org/c/openstack/glance/+/890423

    Release note: https://review.opendev.org/c/openstack/charm-guide/+/891010

    Closes-Bug: 1994053
    Related-Bug: 2028895
    Change-Id: I9548c90e663285c6e7a70eebc8c135a5568974bc

Changed in charm-glance:
status: In Progress → Fix Committed
Felipe Reyes (freyes)
Changed in charm-guide:
assignee: nobody → Rafael Lopez (rafael.lopez)
Changed in charm-guide:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-guide (master)

Reviewed: https://review.opendev.org/c/openstack/charm-guide/+/891010
Committed: https://opendev.org/openstack/charm-guide/commit/3b32a4af1d0205bceb54330de2b727d6f57205b3
Submitter: "Zuul (22348)"
Branch: master

commit 3b32a4af1d0205bceb54330de2b727d6f57205b3
Author: Rafael Lopez <email address hidden>
Date: Thu Aug 10 04:33:00 2023 +0000

    Add note for glance custom-image-properties

    Document new config option 'custom-image-properties' for glance
    introduced by:

    https://review.opendev.org/c/openstack/charm-glance/+/875797

    Closes-Bug: #1994053
    Change-Id: I706f9ad162a06e577af53f7c694b1d97a1d399b0

Changed in charm-guide:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (stable/zed)

Fix proposed to branch: stable/zed
Review: https://review.opendev.org/c/openstack/charm-glance/+/897451

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/charm-glance/+/897504

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-glance (stable/2023.1)

Fix proposed to branch: stable/2023.1
Review: https://review.opendev.org/c/openstack/charm-glance/+/898078

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/charm-glance/+/898078
Committed: https://opendev.org/openstack/charm-glance/commit/7e6ec41835f0a112cc361dad42acb9abdf61fa54
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 7e6ec41835f0a112cc361dad42acb9abdf61fa54
Author: Rafael Lopez <email address hidden>
Date: Wed Mar 1 01:32:01 2023 +0000

    Add configuration option for custom image properties

    Added configuration for injecting default image properties using the
    interoperable image import process. This change adds 1 configuration
    option to the charm:
    - 'custom-import-properties' to specify the desired custom properties

    Note: current glance docs example shows incorrect quoting, the
    implemented format in this change (no quotes) is correct. Docs fix
    in: https://review.opendev.org/c/openstack/glance/+/890423

    Release note: https://review.opendev.org/c/openstack/charm-guide/+/891010

    Closes-Bug: 1994053
    Related-Bug: 2028895
    Change-Id: I9548c90e663285c6e7a70eebc8c135a5568974bc
    (cherry picked from commit 0a1d645000576e5ccbc723614e0610eeffd29935)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/charm-glance/+/897451
Committed: https://opendev.org/openstack/charm-glance/commit/fac0d5547fe4fec5726b699685cae1fd4ed56b01
Submitter: "Zuul (22348)"
Branch: stable/zed

commit fac0d5547fe4fec5726b699685cae1fd4ed56b01
Author: Rafael Lopez <email address hidden>
Date: Wed Mar 1 01:32:01 2023 +0000

    Add configuration option for custom image properties

    Added configuration for injecting default image properties using the
    interoperable image import process. This change adds 1 configuration
    option to the charm:
    - 'custom-import-properties' to specify the desired custom properties

    Note: current glance docs example shows incorrect quoting, the
    implemented format in this change (no quotes) is correct. Docs fix
    in: https://review.opendev.org/c/openstack/glance/+/890423

    Release note: https://review.opendev.org/c/openstack/charm-guide/+/891010

    Closes-Bug: 1994053
    Related-Bug: 2028895
    Change-Id: I9548c90e663285c6e7a70eebc8c135a5568974bc
    (cherry picked from commit 0a1d645000576e5ccbc723614e0610eeffd29935)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-glance (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/charm-glance/+/897504
Committed: https://opendev.org/openstack/charm-glance/commit/3fadd2374f99bb7d4e212cbe6cdb8116d5eecfbd
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 3fadd2374f99bb7d4e212cbe6cdb8116d5eecfbd
Author: Rafael Lopez <email address hidden>
Date: Wed Mar 1 01:32:01 2023 +0000

    Add configuration option for custom image properties

    Added configuration for injecting default image properties using the
    interoperable image import process. This change adds 1 configuration
    option to the charm:
    - 'custom-import-properties' to specify the desired custom properties

    Note: current glance docs example shows incorrect quoting, the
    implemented format in this change (no quotes) is correct. Docs fix
    in: https://review.opendev.org/c/openstack/glance/+/890423

    Release note: https://review.opendev.org/c/openstack/charm-guide/+/891010

    Closes-Bug: 1994053
    Related-Bug: 2028895
    Change-Id: I9548c90e663285c6e7a70eebc8c135a5568974bc
    (cherry picked from commit 0a1d645000576e5ccbc723614e0610eeffd29935)

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.