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.
NOTE(lyarwood): Conflict as I361af845d6a733618ecd056aa7df973191184ae9 is
not present in stable/stein.
Conflicts: nova/virt/libvirt/imagebackend.py
Closes-Bug: 1860990
Change-Id: Ia6c184c31a980e4728b7309b2afaec4d9f494ac3
(cherry picked from commit 65825ebfbd58920adac5e8594891eec8e9cec41f)
(cherry picked from commit 03d59e289369df4980bc1e7350e7f52a6f6aa828)
Reviewed: https:/ /review. opendev. org/708615 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=b3afe748335 886403315c6a7bb a6a8879a05d077
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit b3afe7483358864 03315c6a7bba6a8 879a05d077
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.
NOTE(lyarwood): Conflict as I361af845d6a733 618ecd056aa7df9 73191184ae9 is
not present in stable/stein.
Conflicts:
nova/virt/ libvirt/ imagebackend. py
Closes-Bug: 1860990 4728b7309b2afae c4d9f494ac3 adac5e8594891ee c8e9cec41f) 980bc1e7350e7f5 2a6f6aa828)
Change-Id: Ia6c184c31a980e
(cherry picked from commit 65825ebfbd58920
(cherry picked from commit 03d59e289369df4