Merge "openstack: Remove metadata limit checks"
This commit is contained in:
commit
67c1cb2db8
@ -257,10 +257,7 @@ Selecting the OpenStack driver adds the following options to the
|
|||||||
.. attr:: meta
|
.. attr:: meta
|
||||||
:type: dict
|
:type: dict
|
||||||
|
|
||||||
Arbitrary key/value metadata to store for this server using
|
Arbitrary key/value metadata to store as glance image properties.
|
||||||
the Nova metadata service. A maximum of five entries is
|
|
||||||
allowed, and both keys and values must be 255 characters or
|
|
||||||
less.
|
|
||||||
|
|
||||||
.. attr:: connection-type
|
.. attr:: connection-type
|
||||||
:type: string
|
:type: string
|
||||||
|
@ -265,16 +265,6 @@ class OpenStackProviderConfig(ProviderConfig):
|
|||||||
# This dict is expanded and used as custom properties when
|
# This dict is expanded and used as custom properties when
|
||||||
# the image is uploaded.
|
# the image is uploaded.
|
||||||
i.meta = image.get('meta', {})
|
i.meta = image.get('meta', {})
|
||||||
# 5 elements, and no key or value can be > 255 chars
|
|
||||||
# per Nova API rules
|
|
||||||
if i.meta:
|
|
||||||
if len(i.meta) > 5 or \
|
|
||||||
any([len(k) > 255 or len(v) > 255
|
|
||||||
for k, v in i.meta.items()]):
|
|
||||||
# soft-fail
|
|
||||||
# self.log.error("Invalid metadata for %s; ignored"
|
|
||||||
# % i.name)
|
|
||||||
i.meta = {}
|
|
||||||
|
|
||||||
for image in self.provider.get('cloud-images', []):
|
for image in self.provider.get('cloud-images', []):
|
||||||
i = ProviderCloudImage()
|
i = ProviderCloudImage()
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Removes diskimage.meta checks from the OpenStack driver. The limit of only
|
||||||
|
5 entries is anachronistic and now removed. Rather than trying to pre-guess
|
||||||
|
what OpenStack wants the metadata is now passed as-is and OpenStack will
|
||||||
|
reject it at upload time.
|
||||||
|
|
||||||
|
Previously, metadata was checked by nodepool and invalid values would cause
|
||||||
|
all metadata to be silently ignored. Now, metadata will be passed directly
|
||||||
|
to glance, and an API error will occur. This may mean that images that
|
||||||
|
previously uploaded (with no metadata) will now cause an API error when
|
||||||
|
uploading.
|
Loading…
Reference in New Issue
Block a user