From cfffafa90606792e49bee49156bf451fce922148 Mon Sep 17 00:00:00 2001 From: Javier Pena Date: Tue, 26 May 2020 16:31:19 +0200 Subject: [PATCH] Fix CI jobs - Add jobs removed in [1] to the local configuration. - Fix SSH key distribution in multinode job. It was broken on a recent Zuul update, it seems. [1] - https://review.opendev.org/730813 Change-Id: I2572d92cbaabc1f02fc0790896ccaa3edfc5e6c2 (cherry picked from commit 76b1559d3a161b0d2326ada77bc69d089639075f) (cherry picked from commit 100c950bc7838d691841f8d0f2801eef9579ba5e) --- .zuul.yaml | 10 ++++++++++ playbooks/packstack-multinode.yaml | 27 ++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index e0f73094e..347226eaf 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -163,12 +163,22 @@ - project: check: jobs: + - openstack-tox-pep8 + - openstack-tox-py27 + - build-openstack-releasenotes: + vars: + sphinx_python: python3 - packstack-integration-scenario001-tempest - packstack-integration-scenario002-tempest - packstack-integration-scenario003-tempest - packstack-multinode-scenario002-tempest gate: jobs: + - openstack-tox-pep8 + - openstack-tox-py27 + - build-openstack-releasenotes: + vars: + sphinx_python: python3 - packstack-integration-scenario001-tempest - packstack-integration-scenario002-tempest - packstack-integration-scenario003-tempest diff --git a/playbooks/packstack-multinode.yaml b/playbooks/packstack-multinode.yaml index 771ddcb7e..e622212f2 100644 --- a/playbooks/packstack-multinode.yaml +++ b/playbooks/packstack-multinode.yaml @@ -18,7 +18,7 @@ become: true - hosts: controller - name: packstack-multinode + name: packstack-ssh-preparation-1 tasks: - name: Generate SSH key on controller shell: ssh-keygen -t rsa -f /root/.ssh/id_rsa -P "" @@ -31,14 +31,6 @@ become: true register: ssh_key - - name: Deploy SSH key on compute node - authorized_key: - user: root - state: present - key: "{{ ssh_key.stdout }}" - delegate_to: "{{ hostvars['compute'].ansible_host }}" - become: true - - name: Deploy SSH key on controller authorized_key: user: root @@ -46,6 +38,23 @@ key: "{{ ssh_key.stdout }}" become: true + - name: Set SSH key fact to be used by the compute node + set_fact: + sshkey: "{{ ssh_key.stdout }}" + +- hosts: compute + name: packstack-ssh-preparation-2 + tasks: + - name: Deploy SSH key on compute node + authorized_key: + user: root + state: present + key: "{{ hostvars['controller'].sshkey }}" + become: true + +- hosts: controller + name: packstack-multinode + tasks: - name: Run Packstack shell: cmd: |