commit 651d775370c4560deeb635c9596f8860d56921fa
Author: Doug Goldstein <email address hidden>
Date: Sat Feb 22 18:34:59 2025 -0600
fix glance metadata layout
The code here builds a dictionary from a glance v2 image object that
roughly resembles the glance v2 image object. The current behavior
nests the 'properties' set on the image under it's own 'properties' key
resulting in the image properties never being seen by the Ironic code.
The breakage results from the change from glanceclient to the SDK which
changed the shape of the returned object. The glanceclient object shape
was that of FakeImage while the SDK returns a Resource based object
which includes attributes for all possible fields which are defined at
the top-level of the object. Since the tests run against a different
value they did not cature the failure. Just changing to the SDK object
results in us copying all these new values to the properties dict which
is definitely not the intention. For maximum compatibility to backport
this filters any value not set from being set into properties and sets
the rest. The broken path is any user of get_image_properties()
(both copies from common/images and deploy_utils) checking for user
supplied properties.
Reviewed: https:/ /review. opendev. org/c/openstack /ironic/ +/944306 /opendev. org/openstack/ ironic/ commit/ 651d775370c4560 deeb635c9596f88 60d56921fa
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/2024.2
commit 651d775370c4560 deeb635c9596f88 60d56921fa
Author: Doug Goldstein <email address hidden>
Date: Sat Feb 22 18:34:59 2025 -0600
fix glance metadata layout
The code here builds a dictionary from a glance v2 image object that properties( )
roughly resembles the glance v2 image object. The current behavior
nests the 'properties' set on the image under it's own 'properties' key
resulting in the image properties never being seen by the Ironic code.
The breakage results from the change from glanceclient to the SDK which
changed the shape of the returned object. The glanceclient object shape
was that of FakeImage while the SDK returns a Resource based object
which includes attributes for all possible fields which are defined at
the top-level of the object. Since the tests run against a different
value they did not cature the failure. Just changing to the SDK object
results in us copying all these new values to the properties dict which
is definitely not the intention. For maximum compatibility to backport
this filters any value not set from being set into properties and sets
the rest. The broken path is any user of get_image_
(both copies from common/images and deploy_utils) checking for user
supplied properties.
Closes-Bug: 2099953 8455646db9a3a80 c3b9ece5c97 cf7325195077fe5 05ed33ae30)
Change-Id: I1842e2651fd2bd
Signed-off-by: Doug Goldstein <email address hidden>
(cherry picked from commit 05734cfc95ad36e