libvirt: Ignore DiskNotFound during update_available_resource
There was a previous attempt to fix this in
change Id687e11e235fd6c2f99bb647184310dfdce9a08d. However, there were 2
problems with the previous fix:
1. The handling of missing volumes and disks, while typically having the
same cause, was inconsistent.
2. It failed to consider the very wide race opportunity in _get_disk_over_committed_size_total between initially fetching the
instance list from the DB and later getting disk sizes.
Because _get_disk_over_committed_size_total() can be a very long
operation, we found that we were reliably hitting this race in CI.
It might be possible to fix the race, but this would add unnecessary
complication to code which isn't critical. It's far more robust just to
log it and ignore it, which is also consistent with the handling of
missing volumes.
Closes-Bug: #1774249
Change-Id: I48719c02713113a41176b8f5cc3c5831f1284a39
(cherry picked from commit 6198f317be549e6d2bd324a48f226b379556e945)
(cherry picked from commit 73d9b6e5f622dc645ac6ad322c836ffbe4045072)
(cherry picked from commit 4700b3658e5983a731d0da259365317e230c4a52)
Reviewed: https:/ /review. opendev. org/711278 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=1962633328d c7227dd040c1cf3 a9cbe97b36ea37
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 1962633328dc722 7dd040c1cf3a9cb e97b36ea37
Author: Matthew Booth <email address hidden>
Date: Fri Sep 27 16:51:02 2019 +0100
libvirt: Ignore DiskNotFound during update_ available_ resource
There was a previous attempt to fix this in c2f99bb64718431 0dfdce9a08d. However, there were 2
change Id687e11e235fd6
problems with the previous fix:
1. The handling of missing volumes and disks, while typically having the
same cause, was inconsistent.
2. It failed to consider the very wide race opportunity in
_get_disk_ over_committed_ size_total between initially fetching the
instance list from the DB and later getting disk sizes.
Because _get_disk_ over_committed_ size_total( ) can be a very long
operation, we found that we were reliably hitting this race in CI.
It might be possible to fix the race, but this would add unnecessary
complication to code which isn't critical. It's far more robust just to
log it and ignore it, which is also consistent with the handling of
missing volumes.
Closes-Bug: #1774249
Change-Id: I48719c02713113 a41176b8f5cc3c5 831f1284a39 d2bd324a48f226b 379556e945) 45ac6ad322c836f fbe4045072) 731d0da25936531 7e230c4a52)
(cherry picked from commit 6198f317be549e6
(cherry picked from commit 73d9b6e5f622dc6
(cherry picked from commit 4700b3658e5983a