diff --git a/.zuul.yaml b/.zuul.yaml index 62c2773d..f2789b2e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -12,7 +12,7 @@ - "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-functional-test.yml" roles: - zuul: github.com/openstack-k8s-operators/ci-framework - required-projects: + required-projects: &required_projects - name: github.com/infrawatch/service-telemetry-operator - name: openstack-k8s-operators/ci-framework override-checkout: main @@ -35,6 +35,21 @@ - README* - .*/*.md +- job: + name: functional-logging-tests-osp18 + parent: telemetry-operator-multinode-logging + description: | + Run the logging functional tests on osp18 + vars: + cifmw_extras: + - "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}/scenarios/centos-9/multinode-ci.yml" + - "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/telemetry-operator'].src_dir }}/ci/vars-logging.yml" + - "@{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/vars-logging-test.yml" + roles: + - zuul: github.com/openstack-k8s-operators/ci-framework + required-projects: *required_projects + irrelevant-files: *irrelevant_files + - job: name: feature-verification-tests-noop parent: noop @@ -45,7 +60,6 @@ - ci/noop.yml files: *irrelevant_files - - project: name: infrawatch/feature-verification-tests github-check: @@ -54,3 +68,4 @@ - openstack-k8s-operators-content-provider: override-checkout: main - functional-tests-on-osp18 + - functional-logging-tests-osp18 diff --git a/callback_plugins/custom_logger.py b/callback_plugins/custom_logger.py index 848437da..665b87ed 100644 --- a/callback_plugins/custom_logger.py +++ b/callback_plugins/custom_logger.py @@ -76,14 +76,12 @@ def log_task_result(self, host, result, task_name): def log_summary_results(self, host): file_path = os.path.join(self.output_dir, f"summary_results.log") - # temperorily add more detail to the output - print(self.results) - # Make sure that the there is a result for the host, or else we get errors referencing the results dict later + # Make sure that the there is a result for the host, or else we get + # errors referencing the results dict later if not self.results.get(host): print("The host %s does not have any results" % host) return - # TODO: update this to render the results into a template. with open(file_path, 'w') as f: f.write(f"Host: {host}\n") diff --git a/ci/logging_tests_computes.yml b/ci/logging_tests_computes.yml new file mode 100644 index 00000000..717de0d1 --- /dev/null +++ b/ci/logging_tests_computes.yml @@ -0,0 +1,17 @@ +--- +- name: "Verify logging journalctl identifiers" + hosts: computes + gather_facts: true + ignore_errors: true + environment: + KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" + PATH: "{{ cifmw_path }}" + vars: + journal_test_id: "RHOSO-12681" + journal_list: + - ceilometer_agent_compute + - nova_compute + tasks: + - name: "Verify journalctl logging identifiers" + ansible.builtin.import_role: + name: telemetry_logging diff --git a/ci/vars-logging-test.yml b/ci/vars-logging-test.yml new file mode 100644 index 00000000..70ea1ba1 --- /dev/null +++ b/ci/vars-logging-test.yml @@ -0,0 +1,8 @@ +--- +post_deploy_00_fvt_logging_computes: + source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/logging_tests_computes.yml" + config_file: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/ansible.cfg" + type: playbook +post_deploy_99_collect_results: + source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/infrawatch/feature-verification-tests'].src_dir }}/ci/report_result.yml" + type: playbook