libvirt: Make `cpu_model_extra_flags` case-insensitive for real
When we introduced `cpu_model_extra_flags` config attribute (in
commit: 6b601b7 -- "libvirt: Allow to specify granular CPU feature
flags"), we said it was case-insensitive; but unfortunately I missed to
_really_ make it so (despite proposing code for it in one of the
revisions).
Address that mistake by making `cpu_model_extra_flags` case-insensitive
for real, from Nova's point of view.
NB: Internally, this patch is normalizing 'extra_flags' to _lower_
casing -- because CPU flags _must_ be lower case from libvirt's point of
view. Nova must honour that; otherwise, launching instances with an
upper case CPU flag, 'FOO', will fail with: "libvirtError: internal
error: Unknown CPU feature FOO".
Reviewed: https:/ /review. openstack. org/565672 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=691ffcfe93c 56efba44230c658 84118dbd9f89af
Committed: https:/
Submitter: Zuul
Branch: stable/ocata
commit 691ffcfe93c56ef ba44230c6588411 8dbd9f89af
Author: Kashyap Chamarthy <email address hidden>
Date: Sat Apr 28 18:55:25 2018 +0200
libvirt: Make `cpu_model_ extra_flags` case-insensitive for real
When we introduced `cpu_model_ extra_flags` config attribute (in
commit: 6b601b7 -- "libvirt: Allow to specify granular CPU feature
flags"), we said it was case-insensitive; but unfortunately I missed to
_really_ make it so (despite proposing code for it in one of the
revisions).
Address that mistake by making `cpu_model_ extra_flags` case-insensitive
for real, from Nova's point of view.
NB: Internally, this patch is normalizing 'extra_flags' to _lower_
casing -- because CPU flags _must_ be lower case from libvirt's point of
view. Nova must honour that; otherwise, launching instances with an
upper case CPU flag, 'FOO', will fail with: "libvirtError: internal
error: Unknown CPU feature FOO".
Related-Bug: #1750829 76c009f3a0c6199 c4ba419cfb1 d3b627b93da2435 572275b921) 7409356f29139a9 edfbb98747) 28447fb78d0f540 04054ae8b9)
Change-Id: Ia7ff0566a5109c
Reported-by: Daniel P. Berrangé <email address hidden>
Signed-off-by: Kashyap Chamarthy <email address hidden>
(cherry picked from commit 8e438eda9bb16cd
(cherry picked from commit f9ab466c6d9bb65
(cherry picked from commit efa26e8dc24b5e8