From 3453c6414228b11bc5dd3c8bd4c4f9a3ceb5cbc1 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 20 Feb 2018 08:25:45 -0600 Subject: [PATCH] CentOS 7 integrated gate optimization The CentOS 7 AIO jobs time out fairly frequently in the gates and this patch switches the jobs to use the new aio_basekit scenario in the hopes that jobs will complete more often. This patch also sets SELinux to Permissive mode for CentOS 7 gate testing. This can be changed back to Enforcing when CentOS 7's SELinux policies are ready. This patch also sets package_state to present for CentOS 7 jobs. This is a temporary measure to ensure more of the gate jobs can finish on time and we can expose deployment issues in the gates. (This backport fixes a cherry-pick conflict in project.yaml.) Change-Id: Ic478a7402fee3df0667f0d6fd9a714688808b2ec (cherry picked from commit f4bc81cff97e943a28d89213305e80f5a5ccac79) --- inventory/group_vars/all/all.yml | 6 ++++-- .../bootstrap-host/tasks/prepare_aio_config.yml | 12 ++++++++++++ zuul.d/jobs.yaml | 7 +++++++ zuul.d/project.yaml | 7 +++++-- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/inventory/group_vars/all/all.yml b/inventory/group_vars/all/all.yml index 67a8772614..3d3de9d890 100644 --- a/inventory/group_vars/all/all.yml +++ b/inventory/group_vars/all/all.yml @@ -23,8 +23,10 @@ debug: False ssh_delay: 5 # Set the package install state for distribution packages -# Options are 'present' and 'latest' -package_state: "latest" +# Options are 'present' and 'latest'. +# NOTE(mhayden): Allowing CentOS 7 to use package_state=present should give +# gate jobs a better chance to finish and expose more issues to fix. +package_state: "{{ (ansible_os_family == 'RedHat') | ternary('present', 'latest') }}" # Set "/var/log" to be a bind mount to the physical host. default_bind_mount_logs: true diff --git a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml index 1c1bb6eb22..44306d7c97 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_aio_config.yml @@ -96,6 +96,18 @@ path: /etc/pip.conf register: pip_conf_file +# NOTE(mhayden): The OpenStack CI images for CentOS 7 recently set SELinux to +# Enforcing mode by default. While I am normally a supporter of this change, +# the SELinux policy work for CentOS 7 is not done yet. +- name: Set SELinux to permissive mode in OpenStack-CI + selinux: + policy: targeted + state: permissive + when: + - ansible_selinux.status is defined + - ansible_selinux.status == "enabled" + + # This is a very dirty hack due to images.linuxcontainers.org # constantly failing to resolve in openstack-infra. - name: Implement hard-coded hosts entries for consistently failing name diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 5603efda75..6420ae95ab 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -108,6 +108,13 @@ nodeset: centos-7 voting: false +- job: + name: openstack-ansible-deploy-aio_basekit-centos-7 + parent: openstack-ansible-deploy-aio_lxc-centos-7 + vars: + action: deploy + scenario: aio_basekit + - job: name: openstack-ansible-deploy-ceph-centos-7 parent: openstack-ansible-deploy-aio_lxc-centos-7 diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index be60754541..34120a31b4 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -17,13 +17,16 @@ jobs: - openstack-ansible-linters - openstack-ansible-varstest-aio_lxc-ubuntu-xenial - - openstack-ansible-deploy-aio_lxc-centos-7 + # NOTE(mhayden): Temporarily replacing with aio_basekit scenario. + # - openstack-ansible-deploy-aio_lxc-centos-7 - openstack-ansible-deploy-aio_lxc-opensuse-423 - openstack-ansible-deploy-aio_lxc-ubuntu-xenial - - openstack-ansible-deploy-ceph-centos-7 + # NOTE(mhayden): Temporarily replacing with aio_basekit scenario. + # - openstack-ansible-deploy-ceph-centos-7 - openstack-ansible-deploy-ceph-ubuntu-xenial - openstack-ansible-deploy-ceph-opensuse-423 - openstack-ansible-deploy-aio_metal-ubuntu-xenial + - openstack-ansible-deploy-aio_basekit-centos-7 experimental: jobs: - openstack-ansible-deploy-octavia-ubuntu-xenial