From 1cc654103b6f32e83f7ceb61481fa19a8129dd9c Mon Sep 17 00:00:00 2001 From: pinikomarov Date: Sat, 4 Jul 2020 03:27:16 +0300 Subject: [PATCH] Fix tripleo-validations : roles not found This is due to a missing package and some poor static vars which I remove here.. EROROR messages: ERROR! the role 'haproxy' was not found in /home/stack/tripleo-validations/playbooks/roles:/home/stack/.ansible/roles:/var/log/validations/artifacts/c658cc41-926c-42a1-8933-ad37da38aa4d_haproxy.yaml_2020-07-03T22:/var/log/validations/artifacts/c658cc41-926c-42a1-8933-ad37da38aa4d_haproxy.yaml_2020-07-03T22:55:33.205590Z/runner_di_bi277gxt/55:/var/log/validations/artifacts/c658cc41-926c-42a1-8933-ad37da38aa4d_haproxy.yaml_2020-07-03T22:55:33.205590Z/runner_di_bi277gxt/33.205590Z/roles:/home/stack/tobiko/roles:/usr/share/ansible/roles:/usr/share/ceph-ansible/roles:/etc/ansible/roles:/usr/share/validations-common/roles:/home/stack/tripleo-validations/playbooks The error appears to be in '/home/stack/tripleo-validations/playbooks/haproxy.yaml': line 17, column 7, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: roles: - haproxy ^ here Change-Id: Ib4879a848da7022723566b3ecb4422640d8a8268 --- .../roles/tobiko-ir-deploy/tasks/main.yaml | 14 ++++++++------ tobiko/tripleo/validations.py | 6 +----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/infrared_plugin/roles/tobiko-ir-deploy/tasks/main.yaml b/infrared_plugin/roles/tobiko-ir-deploy/tasks/main.yaml index 28f26e85c..62281cdd8 100644 --- a/infrared_plugin/roles/tobiko-ir-deploy/tasks/main.yaml +++ b/infrared_plugin/roles/tobiko-ir-deploy/tasks/main.yaml @@ -60,9 +60,11 @@ - name: "show last change details" debug: var=get_git_log.stdout_lines -#we need also the master here so we are on the latest branch of validations -- name: "get validation-framework master checks" - git: - repo: https://github.com/openstack/tripleo-validations.git - dest: "{{ ansible_env.HOME }}/tripleo-validations" - version: master +#we install validations-common here since it's +#packaged by rhel-osp +- name: install validations-common + ignore_errors: yes + become: true + package: + name: validations-common + state: present diff --git a/tobiko/tripleo/validations.py b/tobiko/tripleo/validations.py index fd7afc12f..4d5feb3ca 100644 --- a/tobiko/tripleo/validations.py +++ b/tobiko/tripleo/validations.py @@ -15,7 +15,6 @@ from __future__ import absolute_import from oslo_log import log from validations_libs import validation_actions -from validations_libs import constants as v_consts from tobiko.tripleo import overcloud from tobiko.openstack import topology @@ -24,8 +23,6 @@ from tobiko.shell import sh LOG = log.getLogger(__name__) -v_consts.DEFAULT_VALIDATIONS_BASEDIR = '/home/stack/tripleo-validations' - def prepare_ansible_hosts_inventory(): """create a hosts.yaml with ansible connections' @@ -44,8 +41,7 @@ def run_post_deployment_validations(): if overcloud.has_overcloud(): prepare_ansible_hosts_inventory() failures = [] - validates_object = validation_actions.ValidationActions( - validation_path='/home/stack/tripleo-validations/playbooks') + validates_object = validation_actions.ValidationActions() validations_result = validates_object.run_validations( group='post-deployment', quiet=False,