Reduce logging level of API validation messages.

cinder.utils.check_metadata_properties logs validation failures
at warning level, which it really shouldn't - API validation is
not something the admin really cares about.

This patch changes them to debug.

Closes-Bug: #1599732
Change-Id: I33ea67e32a007ff1a3f0b8111b16b1e18cd207e6
This commit is contained in:
Duncan Thomas 2016-07-07 07:44:50 +01:00
parent 5c40bf9225
commit 2a082676e7

View File

@ -169,17 +169,17 @@ def check_metadata_properties(metadata=None):
for k, v in metadata.items(): for k, v in metadata.items():
if len(k) == 0: if len(k) == 0:
msg = _("Metadata property key blank.") msg = _("Metadata property key blank.")
LOG.warning(msg) LOG.debug(msg)
raise exception.InvalidVolumeMetadata(reason=msg) raise exception.InvalidVolumeMetadata(reason=msg)
if len(k) > 255: if len(k) > 255:
msg = _("Metadata property key %s greater than 255 " msg = _("Metadata property key %s greater than 255 "
"characters.") % k "characters.") % k
LOG.warning(msg) LOG.debug(msg)
raise exception.InvalidVolumeMetadataSize(reason=msg) raise exception.InvalidVolumeMetadataSize(reason=msg)
if len(v) > 255: if len(v) > 255:
msg = _("Metadata property key %s value greater than " msg = _("Metadata property key %s value greater than "
"255 characters.") % k "255 characters.") % k
LOG.warning(msg) LOG.debug(msg)
raise exception.InvalidVolumeMetadataSize(reason=msg) raise exception.InvalidVolumeMetadataSize(reason=msg)