Merge "Avoid BadRequest error log on volume attachment"
This commit is contained in:
@@ -768,6 +768,9 @@ class API(object):
|
||||
return _translate_attachment_ref(attachment_ref)
|
||||
except cinder_exception.ClientException as ex:
|
||||
with excutils.save_and_reraise_exception():
|
||||
# NOTE: It is unnecessary to output BadRequest(400) error log,
|
||||
# because operators don't need to debug such cases.
|
||||
if getattr(ex, 'code', None) != 400:
|
||||
LOG.error(('Create attachment failed for volume '
|
||||
'%(volume_id)s. Error: %(msg)s Code: %(code)s'),
|
||||
{'volume_id': volume_id,
|
||||
|
Reference in New Issue
Block a user