From 4aa08a25b8f667cd6385cea5172b1b0d60df0ca7 Mon Sep 17 00:00:00 2001 From: Grzegorz Grasza Date: Tue, 3 Dec 2019 10:29:03 +0100 Subject: [PATCH] Remove functional tests gate for centos7 and workarounds for python2 CentOS 7 job is running with python2, which is no longer supported by nova. Devstack also dropped it's platform tests for CentOS. Change-Id: I74b04cf6ecd978bfc5fbf3b2c7484a79d28ae826 --- .zuul.yaml | 18 ++++---------- roles/configure-freeipa/tasks/main.yaml | 31 ------------------------- scripts/novajoin-install | 5 +++- 3 files changed, 8 insertions(+), 46 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index b9134b6..c1a157e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -8,19 +8,20 @@ jobs: - novajoin-functional: voting: false - - novajoin-functional-py3: - voting: false - job: name: novajoin-functional description: | Run functional tests for novajoin. parent: devstack-tox-base - nodeset: devstack-single-node-centos-7 + nodeset: devstack-single-node-fedora-latest pre-run: playbooks/functional/pre.yaml run: playbooks/functional/run.yaml post-run: playbooks/functional/post.yaml vars: + tox_envlist: functional-py3 + bindep_profile: test py3 + python_version: 3 devstack_services: # FreeIPA is using Apache with TLS tls-proxy: false @@ -46,14 +47,3 @@ # Disable Cinder services c-bak: false c-vol: false - -- job: - name: novajoin-functional-py3 - description: | - Run functional tests under Python 3. - parent: novajoin-functional - nodeset: devstack-single-node-fedora-latest - vars: - tox_envlist: functional-py3 - bindep_profile: test py3 - python_version: 3 diff --git a/roles/configure-freeipa/tasks/main.yaml b/roles/configure-freeipa/tasks/main.yaml index 3ec4f58..8227e8e 100644 --- a/roles/configure-freeipa/tasks/main.yaml +++ b/roles/configure-freeipa/tasks/main.yaml @@ -1,21 +1,3 @@ -- name: Find Paramiko ssh_gss.py - command: python -c "from paramiko import ssh_gss; print(ssh_gss.__file__.rstrip('c'))" - register: ssh_gss_file - -- name: Patch Paramiko (https://github.com/paramiko/paramiko/pull/1311) - replace: - path: '{{ ssh_gss_file.stdout }}' - regexp: 'GSS_EXCEPTIONS = \(gssapi.GSSException,\)' - replace: 'GSS_EXCEPTIONS = ()' - become: true - -- name: Patch Paramiko (https://github.com/paramiko/paramiko/pull/1311) - replace: - path: '{{ ssh_gss_file.stdout }}' - regexp: 'GSS_AUTH_AVAILABLE = True' - replace: 'GSS_AUTH_AVAILABLE = False' - become: true - - name: Install paramiko to patch it (Python3) pip: name: paramiko @@ -100,16 +82,3 @@ --forwarder={{ unbound_primary_nameserver_v4 | default('1.1.1.1') }} --forwarder={{ unbound_secondary_nameserver_v4 | default('8.8.8.8') }} become: true - -- name: Remove system python-decorator package which conflicts with devstack - command: rpm -e --nodeps python-decorator-3.4.0-3.el7.noarch - become: true - ignore_errors: yes - when: python_version is not defined - -- name: Install the latest decorator module for devstack - pip: - name: decorator - state: forcereinstall - become: true - when: python_version is not defined diff --git a/scripts/novajoin-install b/scripts/novajoin-install index 4ebed00..c95897b 100755 --- a/scripts/novajoin-install +++ b/scripts/novajoin-install @@ -237,13 +237,16 @@ def install(opts): join_config.write(f) logger.info('Importing IPA metadata') + #NOTE(xek): pass in os.environ, because ipautils overwrites PATH otherwise (stdout, stderr, returncode) = run( ['glance', '--os-image-api-version', '2', 'md-namespace-import', '--file', - '/usr/share/novajoin/freeipa.json'], raiseonerr=False) + '/usr/share/novajoin/freeipa.json'], + raiseonerr=False, + env=os.environ) if returncode != 0: logger.error('Adding IPA metadata failed: %s' % stderr)