When an IMS image is created, if a metadata key and value (also known as an image label) are specified, then the created image does not have the expected metadata.
This is the expected format after creating an image with a metadata key and value specified:
"metadata": {
"<metadata_key>": "<metadata_value>"
}
Because of the issue described on this page, the actual format is:
"metadata": {
"key": "<metadata_key>",
"value": "<metadata_value>"
}
This bug is fixed in CSM 1.7.0. In earlier CSM versions, the only option is to use the provided Workaround.
For more information on managing IMS image metadata, see Manage image labels.
When desiring an IMS image to have a particular metadata key and value set, there are three different scenarios an administrator may be in:
In this case, the issue can be avoided by not specifying the metadata when creating the image, and instead setting it after the image has already been created.
Create the IMS image without specifying metadata.
Update the IMS image to set the desired metadata.
See Set image metadata.
In this case, the issue documented on this page does not apply, and no workaround is necessary. Simply update the IMS image to set the desired metadata.
See Set image metadata.
In this case, work around the problem by removing the invalid metadata, and then setting the correct metadata.
Remove the incorrect metadata from the image.
Specifically, remove the metadata keys named key and value.
This will require two separate image update calls.
See Remove image metadata.
Update the IMS image to set the desired metadata.
See Set image metadata.