commit 2b86a9caccb37c1800f3b5e6f4b29218a7539479
Author: Dan Smith <email address hidden>
Date: Thu Mar 14 14:07:31 2019 -0700
Avoid crashing while getting libvirt capabilities with unknown arch names
In _get_instance_capabilities() we get a list of host capabilities and then
build a list of arches supported by the virt type of an instance to arrive
at the list of possibilities for the instance. We check each of those
against our enum, but fail to gracefully skip unsupported values should we
encounter one.
This patch makes that graceful, and also introduces an unsupported arch to
the test stub to make sure we always skip it. Note that we do not warn
because this happens once per instance in a periodic task, and since the
situation is caused by a (somewhat permanent) mismatch of libvirt and
nova version support, isn't something that needs to be remedied by an
operator.
Closes-Bug: #1820125
Change-Id: I5d95bd50279a6bf903a5793ad5f3ae9d06f085f4
(cherry picked from commit 71df650d0a390d2b6b19928db4379e723e9f5cde)
Reviewed: https:/ /review. opendev. org/672746 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=2b86a9caccb 37c1800f3b5e6f4 b29218a7539479
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 2b86a9caccb37c1 800f3b5e6f4b292 18a7539479
Author: Dan Smith <email address hidden>
Date: Thu Mar 14 14:07:31 2019 -0700
Avoid crashing while getting libvirt capabilities with unknown arch names
In _get_instance_ capabilities( ) we get a list of host capabilities and then
build a list of arches supported by the virt type of an instance to arrive
at the list of possibilities for the instance. We check each of those
against our enum, but fail to gracefully skip unsupported values should we
encounter one.
This patch makes that graceful, and also introduces an unsupported arch to
the test stub to make sure we always skip it. Note that we do not warn
because this happens once per instance in a periodic task, and since the
situation is caused by a (somewhat permanent) mismatch of libvirt and
nova version support, isn't something that needs to be remedied by an
operator.
Closes-Bug: #1820125 f903a5793ad5f3a e9d06f085f4 b6b19928db4379e 723e9f5cde)
Change-Id: I5d95bd50279a6b
(cherry picked from commit 71df650d0a390d2