Mark Goddard fbf4899764 Make volume Glance metadata bulk update idempotent
The cinder.db.sqlalchemy.api.volume_glance_metadata_bulk_create function
has the following in its docstring:

    This API does not support changing the value of a key once it has
    been created.

However, it actually fails if a specified key exists and has the same
value. This can cause problems if volume creation is retried following a
failure, since the metadata may have already been created.

This change modifies the function to ignore keys that exist and have the
expected value, as per the docstring.

Related-Bug: #1823445

Change-Id: Ibc3f7b995c43bc281b6978bfcba4d1a50db41fa3
2024-10-03 08:23:50 +00:00
..
2015-12-17 10:27:43 +00:00