yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #92698
[Bug 2028895] [NEW] Interoperable Image Import in glance documented format for inject not working as expected
Public bug reported:
According to the documentation, the correct way to specify custom import image metadata properties is:
"inject is a comma-separated list of properties and values that will be injected into the image record for the imported image. Each property and value should be quoted and separated by a colon (‘:’) as shown in the example above."
With the example being:
inject = "property1":"value1","property2":"value2",...
When specifying properties in this way the resulting properties in the imported image look like this:
properties | "property2"='"value2"', "property3"='"value3', os_glance_failed_import='', os_glance_importing_to_stores='', os_hash_algo='sha512', os_hash_value='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', os_hidden='False', owner_specified.openstack.md5='', owner_specified.openstack.object='images/proptest1', owner_specified.openstack.sha256='', property1"='"value1"', stores='local'
If you look closely at each of the properties, the quotes are inconsistent:
"property2"='"value2"'
"property3"='"value3
property1"='"value1"'
Conversely, if you use the following (no quotes):
inject = property1:value1,property2:value2,property3:value3
properties | os_glance_failed_import='',
os_glance_importing_to_stores='', os_hash_algo='sha512',
os_hash_value='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e',
os_hidden='False', owner_specified.openstack.md5='',
owner_specified.openstack.object='images/proptest2',
owner_specified.openstack.sha256='', property1='value1',
property2='value2', property3='value3', stores='local'
Now it looks better:
property1='value1'
property2='value2'
property3='value3'
The resulting quotes using this format seem to match the other standard
properties, ie. key='value' and I suspect what we are going for. I'm
unclear if this is a parser issue or a documentation issue.
-----------------------------------
Release: 27.0.0.0b3.dev5 on 2022-08-30 13:35:51
SHA: 46c30f0b6db6ed6a86b1b84e69748025ad9050c6
Source: https://opendev.org/openstack/glance/src/doc/source/admin/interoperable-image-import.rst
URL: https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html
** Affects: glance
Importance: Undecided
Status: New
** Tags: documentation
** Summary changed:
- Interoperable Image Import in glance documented format for inject not working
+ Interoperable Image Import in glance documented format for inject not working as expected
** Description changed:
According to the documentation, the correct way to specify custom import image metadata properties is:
- "inject is a comma-separated list of properties and values that will be injected into the image record for the imported image. Each property and value should be quoted and separated by a colon (‘:’) as shown in the example above."
+ "inject is a comma-separated list of properties and values that will be injected into the image record for the imported image. Each property and value should be quoted and separated by a colon (‘:’) as shown in the example above."
With the example being:
inject = "property1":"value1","property2":"value2",...
When specifying properties in this way the resulting properties in the imported image look like this:
properties | "property2"='"value2"', "property3"='"value3', os_glance_failed_import='', os_glance_importing_to_stores='', os_hash_algo='sha512', os_hash_value='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', os_hidden='False', owner_specified.openstack.md5='', owner_specified.openstack.object='images/proptest1', owner_specified.openstack.sha256='', property1"='"value1"', stores='local'
If you look closely at each of the properties, the quotes are inconsistent:
"property2"='"value2"'
"property3"='"value3
property1"='"value1"'
Conversely, if you use the following (no quotes):
inject = property1:value1,property2:value2,property3:value3
properties | os_glance_failed_import='',
os_glance_importing_to_stores='', os_hash_algo='sha512',
os_hash_value='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e',
os_hidden='False', owner_specified.openstack.md5='',
owner_specified.openstack.object='images/proptest2',
owner_specified.openstack.sha256='', property1='value1',
property2='value2', property3='value3', stores='local'
Now it looks better:
property1='value1'
property2='value2'
property3='value3'
The resulting quotes using this format seem to match the other standard
- properties, ie. key='value' and I suspect what we are going for.
-
+ properties, ie. key='value' and I suspect what we are going for. I'm
+ unclear if this is a parser issue or a documentation issue.
-----------------------------------
Release: 27.0.0.0b3.dev5 on 2022-08-30 13:35:51
SHA: 46c30f0b6db6ed6a86b1b84e69748025ad9050c6
Source: https://opendev.org/openstack/glance/src/doc/source/admin/interoperable-image-import.rst
URL: https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/2028895
Title:
Interoperable Image Import in glance documented format for inject not
working as expected
Status in Glance:
New
Bug description:
According to the documentation, the correct way to specify custom import image metadata properties is:
"inject is a comma-separated list of properties and values that will be injected into the image record for the imported image. Each property and value should be quoted and separated by a colon (‘:’) as shown in the example above."
With the example being:
inject = "property1":"value1","property2":"value2",...
When specifying properties in this way the resulting properties in the imported image look like this:
properties | "property2"='"value2"', "property3"='"value3', os_glance_failed_import='', os_glance_importing_to_stores='', os_hash_algo='sha512', os_hash_value='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e', os_hidden='False', owner_specified.openstack.md5='', owner_specified.openstack.object='images/proptest1', owner_specified.openstack.sha256='', property1"='"value1"', stores='local'
If you look closely at each of the properties, the quotes are inconsistent:
"property2"='"value2"'
"property3"='"value3
property1"='"value1"'
Conversely, if you use the following (no quotes):
inject = property1:value1,property2:value2,property3:value3
properties | os_glance_failed_import='',
os_glance_importing_to_stores='', os_hash_algo='sha512',
os_hash_value='cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e',
os_hidden='False', owner_specified.openstack.md5='',
owner_specified.openstack.object='images/proptest2',
owner_specified.openstack.sha256='', property1='value1',
property2='value2', property3='value3', stores='local'
Now it looks better:
property1='value1'
property2='value2'
property3='value3'
The resulting quotes using this format seem to match the other
standard properties, ie. key='value' and I suspect what we are going
for. I'm unclear if this is a parser issue or a documentation issue.
-----------------------------------
Release: 27.0.0.0b3.dev5 on 2022-08-30 13:35:51
SHA: 46c30f0b6db6ed6a86b1b84e69748025ad9050c6
Source: https://opendev.org/openstack/glance/src/doc/source/admin/interoperable-image-import.rst
URL: https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/2028895/+subscriptions
Follow ups