If glance and nova are both configured with RBD backend, but glance
does not return location information from the API, nova will fail to
clone the image from glance pool and will download it from the API.
In this case, image will be already flat, and subsequent flatten call
will fail.
This commit makes flatten call idempotent, so that it ignores already
flat images by catching ImageUnacceptable when requesting parent info
from ceph.
Closes-Bug: 1860990
Change-Id: Ia6c184c31a980e4728b7309b2afaec4d9f494ac3
(cherry picked from commit 65825ebfbd58920adac5e8594891eec8e9cec41f)
(cherry picked from commit 03d59e289369df4980bc1e7350e7f52a6f6aa828)
(cherry picked from commit dd3c17216cdf2814cbefc83371c712b3dd9d9147)
(cherry picked from commit 5d44052fedc9914aed4de4af3dcae4de3a03a856)
Reviewed: https:/ /review. opendev. org/708617 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=bb358bdd42c e03da8040128bad 1f79b2b436f25b
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit bb358bdd42ce03d a8040128bad1f79 b2b436f25b
Author: Vladyslav Drok <email address hidden>
Date: Mon Jan 27 15:31:53 2020 +0100
Make RBD imagebackend flatten method idempotent
If glance and nova are both configured with RBD backend, but glance
does not return location information from the API, nova will fail to
clone the image from glance pool and will download it from the API.
In this case, image will be already flat, and subsequent flatten call
will fail.
This commit makes flatten call idempotent, so that it ignores already
flat images by catching ImageUnacceptable when requesting parent info
from ceph.
Closes-Bug: 1860990 4728b7309b2afae c4d9f494ac3 adac5e8594891ee c8e9cec41f) 980bc1e7350e7f5 2a6f6aa828) 4cbefc83371c712 b3dd9d9147) aed4de4af3dcae4 de3a03a856)
Change-Id: Ia6c184c31a980e
(cherry picked from commit 65825ebfbd58920
(cherry picked from commit 03d59e289369df4
(cherry picked from commit dd3c17216cdf281
(cherry picked from commit 5d44052fedc9914