From 926fb27fbeb41cec405e35f0814e14e152aff927 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Fri, 27 Oct 2017 15:44:19 -0700 Subject: [PATCH] Disable kvm on OVH infra instances OVH infra hosts are causing "KVM: entry failed, hardware error 0x0" failures where instances fail to start (cirros, etc.). This patch excludes OVH instances from kvm enablement until the issue is resolved. This patch also fixes an issue with a unit test failing after cryptography 2.1 was released. Co-Authored-By: Adam Harwell Change-Id: I630f513092c61d9785efe49d42aa3cfdc05a927e --- octavia/tests/contrib/gate_hook.sh | 6 +++++- octavia/tests/unit/common/tls_utils/test_cert_parser.py | 8 ++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/octavia/tests/contrib/gate_hook.sh b/octavia/tests/contrib/gate_hook.sh index 3bc6640b9b..a6acaba3d3 100755 --- a/octavia/tests/contrib/gate_hook.sh +++ b/octavia/tests/contrib/gate_hook.sh @@ -25,7 +25,11 @@ export DEVSTACK_LOCAL_CONFIG+=$'\n'"LIBS_FROM_GIT+=,diskimage-builder"$'\n' # Sort out our gate args . $(dirname "$0")/decode_args.sh -if egrep --quiet '(vmx|svm)' /proc/cpuinfo; then +# Note: The check for OVH instances is temporary until they resolve the +# KVM failures as logged here: +# https://bugzilla.kernel.org/show_bug.cgi?id=192521 +# However, this may be resolved at OVH before the kernel bug is resolved. +if $(egrep --quiet '(vmx|svm)' /proc/cpuinfo) && [[ ! $(hostname) =~ "ovh" ]]; then export DEVSTACK_GATE_LIBVIRT_TYPE=kvm fi diff --git a/octavia/tests/unit/common/tls_utils/test_cert_parser.py b/octavia/tests/unit/common/tls_utils/test_cert_parser.py index 39f2db37a0..f7df02bd80 100644 --- a/octavia/tests/unit/common/tls_utils/test_cert_parser.py +++ b/octavia/tests/unit/common/tls_utils/test_cert_parser.py @@ -29,10 +29,10 @@ class TestTLSParseUtils(base.TestCase): def test_alt_subject_name_parses(self): hosts = cert_parser.get_host_names(sample_certs.ALT_EXT_CRT) self.assertIn('www.cnfromsubject.org', hosts['cn']) - self.assertIn('www.hostfromdnsname1.com', hosts['dns_names']) - self.assertIn('www.hostfromdnsname2.com', hosts['dns_names']) - self.assertIn('www.hostfromdnsname3.com', hosts['dns_names']) - self.assertIn('www.hostfromdnsname4.com', hosts['dns_names']) + self.assertIn('www.hostFromDNSName1.com', hosts['dns_names']) + self.assertIn('www.hostFromDNSName2.com', hosts['dns_names']) + self.assertIn('www.hostFromDNSName3.com', hosts['dns_names']) + self.assertIn('www.hostFromDNSName4.com', hosts['dns_names']) def test_x509_parses(self): self.assertRaises(exceptions.UnreadableCert,