From fa9f41f8233cc10e960e7acda9efc5b34847f873 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Wed, 9 Aug 2017 08:43:25 -0500 Subject: [PATCH] Optimize swift gate This patch contains five combined improvements. 1) Remove RabbitMQ from the gate RabbitMQ is only needed in the swift gate if the ceilometer middleware is being deloyed. This isn't enabled in the gate job, so let's save some time and deploy memcached/galera without RabbitMQ. 2) Bindep pyOpenSSL change This commit also includes the pyOpenSSL bindep change in the hopes that we can get the swift gate moving along again. ;) 3) Disable erasure code test for CentOS Due to #1707220 we are running into issues with CentOS 7 running Erasure Code storage policies on RAX hardware. This patch temoprarily disables EC testing for CentOS 7, but we can re-enable that once the package is backported to stable/ocata branch. 4) Pass packages as a list This patch passes a list of packages to the package module rather than using "with_items" and it should speed up the package installation process. 5) Set package state to present Change-Id: Ic7b13853ce00b0f8ac2181e46e2bd8dea5ce377e Co-Authored-By: Andy McCrae --- bindep.txt | 3 +-- tasks/swift_install.yml | 3 +-- tests/inventory | 4 ---- tests/inventory_MR_A | 4 ---- tests/inventory_MR_B | 4 ---- tests/os_swift-overrides-MR-A.yml | 2 ++ tests/os_swift-overrides-MR-B.yml | 2 ++ tests/os_swift-overrides-pypy.yml | 2 ++ tests/os_swift-overrides.yml | 3 +++ tests/test.yml | 9 +++++++-- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bindep.txt b/bindep.txt index 2b8d4ffd..d3ead940 100644 --- a/bindep.txt +++ b/bindep.txt @@ -54,8 +54,7 @@ python-pyasn1 [platform:dpkg platform:suse] python-openssl [platform:dpkg] python-ndg-httpsclient [platform:ubuntu !platform:ubuntu-14] python2-pyasn1 [platform:redhat] -python2-pyOpenSSL [platform:redhat !platform:fedora] -pyOpenSSL [platform:fedora] +pyOpenSSL [platform:redhat] python-pyOpenSSL [platform:opensuseproject-42] python2-pyOpenSSL [platform:suse !platform:opensuseproject-42] python-ndg_httpsclient [platform:redhat !platform:fedora] diff --git a/tasks/swift_install.yml b/tasks/swift_install.yml index 8f962620..66b03ac1 100644 --- a/tasks/swift_install.yml +++ b/tasks/swift_install.yml @@ -15,7 +15,7 @@ - name: Install distro packages package: - name: "{{ item }}" + name: "{{ swift_distro_packages }}" state: "{{ swift_package_state }}" update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" cache_valid_time: "{{ (ansible_pkg_mgr == 'apt') | ternary(cache_timeout, omit) }}" @@ -23,7 +23,6 @@ until: install_packages|success retries: 5 delay: 2 - with_items: "{{ swift_distro_packages }}" - name: Create developer mode constraint file copy: diff --git a/tests/inventory b/tests/inventory index 27695f9d..9c6844ad 100644 --- a/tests/inventory +++ b/tests/inventory @@ -19,13 +19,9 @@ infra1 [memcached_all] infra1 -[rabbitmq_all] -infra1 - [service_all:children] galera_all memcached_all -rabbitmq_all [keystone_all] infra1 diff --git a/tests/inventory_MR_A b/tests/inventory_MR_A index e91d421d..9c452cb6 100644 --- a/tests/inventory_MR_A +++ b/tests/inventory_MR_A @@ -20,13 +20,9 @@ infraMR [memcached_all] infraMR -[rabbitmq_all] -infraMR - [service_all:children] galera_all memcached_all -rabbitmq_all [keystone_all] infraMR diff --git a/tests/inventory_MR_B b/tests/inventory_MR_B index 965abe83..b0b0102d 100644 --- a/tests/inventory_MR_B +++ b/tests/inventory_MR_B @@ -17,13 +17,9 @@ infraMR [memcached_all] infraMR -[rabbitmq_all] -infraMR - [service_all:children] galera_all memcached_all -rabbitmq_all [keystone_all] infraMR diff --git a/tests/os_swift-overrides-MR-A.yml b/tests/os_swift-overrides-MR-A.yml index 1822154a..083dda1c 100644 --- a/tests/os_swift-overrides-MR-A.yml +++ b/tests/os_swift-overrides-MR-A.yml @@ -27,3 +27,5 @@ bridges: test_swift_region: 1 test_swift_repl_network: "eth2" swift_pretend_min_part_hours_passed: True + +swift_package_state: present diff --git a/tests/os_swift-overrides-MR-B.yml b/tests/os_swift-overrides-MR-B.yml index 8c9c5e0f..9afcfbee 100644 --- a/tests/os_swift-overrides-MR-B.yml +++ b/tests/os_swift-overrides-MR-B.yml @@ -16,3 +16,5 @@ test_swift_region: 2 test_swift_repl_network: "eth2" swift_pretend_min_part_hours_passed: True + +swift_package_state: present diff --git a/tests/os_swift-overrides-pypy.yml b/tests/os_swift-overrides-pypy.yml index 924c29de..b8145750 100644 --- a/tests/os_swift-overrides-pypy.yml +++ b/tests/os_swift-overrides-pypy.yml @@ -59,3 +59,5 @@ swift_soft_open_file_limits: 12288 swift_rsync_module_per_drive: True test_swift_repl_number: 2 + +swift_package_state: present diff --git a/tests/os_swift-overrides.yml b/tests/os_swift-overrides.yml index 62a96347..5786f65a 100644 --- a/tests/os_swift-overrides.yml +++ b/tests/os_swift-overrides.yml @@ -51,3 +51,6 @@ swift: ec_num_data_fragments: 3 ec_num_parity_fragments: 2 ec_object_segment_size: 1048576 + deprecated: "{{ ((ansible_os_family | lower) == 'redhat') | ternary('yes', 'no') }}" + +swift_package_state: present diff --git a/tests/test.yml b/tests/test.yml index 849e6467..6e5f0fb6 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -16,10 +16,15 @@ # Setup the keys, host and containers - include: common/test-setup-host.yml -# Install Memcached/Galera/Rabbitmq -- include: common/test-install-infra.yml +# Install Memcached/Galera +# NOTE(mhayden): RabbitMQ is only needed if ceilometer middleware is being +# deployed. That is not included in the gate testing. +- include: common/test-install-memcached.yml +- include: common/test-install-galera.yml # Install Keystone +# NOTE(mhayden): Disable keystone messaging since we are not deploying +# RabbitMQ - include: common/test-install-keystone.yml # Install Swift