From 2de5d0e656bcd6af7da634e797a7a5c1988ccb20 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Tue, 21 Jan 2025 18:18:53 +0000 Subject: [PATCH] Update the logging test playbooks * rename loggin_tests_local playbook to logging_tests_controller * Rename vars in ci/logging_tests_compute and loggin_tests_controller --- ci/logging_tests_computes.yml | 12 +- ci/logging_tests_controller.yml | 113 ++++++++++--- ci/logging_tests_local.yml | 288 -------------------------------- 3 files changed, 93 insertions(+), 320 deletions(-) delete mode 100644 ci/logging_tests_local.yml diff --git a/ci/logging_tests_computes.yml b/ci/logging_tests_computes.yml index 393711c1..bd7ca9f5 100644 --- a/ci/logging_tests_computes.yml +++ b/ci/logging_tests_computes.yml @@ -7,8 +7,8 @@ KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" PATH: "{{ cifmw_path }}" vars: - journal_test_id: "RHOSO-12681" - journal_list: + common_journal_test_id: "RHOSO-12681" + common_journal_list: - ceilometer_agent_compute - nova_compute tasks: @@ -24,14 +24,14 @@ KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" PATH: "{{ cifmw_path }}" vars: - container_test_id: "RHOSO-12753" - container_list: + common_container_test_id: "RHOSO-12753" + common_container_list: - ceilometer_agent_compute - ceilometer_agent_ipmi - node_exporter - file_test_id: "RHOSO-12754" - file_list: + common_file_test_id: "RHOSO-12754" + common_file_list: - /etc/rsyslog.d/10-telemetry.conf tasks: - name: "Run file and container tests" diff --git a/ci/logging_tests_controller.yml b/ci/logging_tests_controller.yml index 9c314a4e..b018af3c 100644 --- a/ci/logging_tests_controller.yml +++ b/ci/logging_tests_controller.yml @@ -7,22 +7,51 @@ KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" PATH: "{{ cifmw_path }}" vars: - common_pod_test_id: "RHOS0-12672" - common_pod_status_str: "Running" - common_pod_nspace: openstack-operators - common_pod_list: - - telemetry-operator-controller-manager - - openstack-operator-controller-manager - common_subscription_test_id: "RHOSO-12678" - common_subscription_nspace: openshift-operators-redhat - common_subscription_list: - - loki-operator common_project_test_id: "RHOSO-12668" common_project_list: - openshift-openstack-infra - openshift - openstack-operators - openshift-logging + common_endpoint_test_id: "RHOSO-12682" + common_endpoint_list: + - [nova,compute,public] + - [nova,compute,internal] + - [placement,placement,public] + - [placement,placement,internal] + - [swift,object-store,public] + - [swift,object-store,internal] + - [cinderv3,volumev3,public] + - [cinderv3,volumev3,internal] + - [barbican,key-manager,public] + - [barbican,key-manager,internal] + - [keystone,identity,public] + - [keystone,identity,internal] + - [glance,image,public] + - [glance,image,internal] + - [neutron,network,public] + - [neutron,network,internal] + + common_crd_test_id: "RHOSO-12670" + common_crd_list: + - alertingrules.loki.grafana.com + - lokistacks.loki.grafana.com + - recordingrules.loki.grafana.com + - rulerconfigs.loki.grafana.com + + common_node_test_id: "RHOSO-12671" + common_node_list: + - edpm-compute-0 + - edpm-compute-1 + - crc + + common_pod_test_id: "RHOS0-12672" + common_pod_status_str: "Running" + common_pod_nspace: openstack-operators + common_pod_list: + - telemetry-operator-controller-manager + - dataplane-operator-controller-manager + common_service_test_id: "RHOSO-12675" common_service_nspace: openshift-logging common_service_list: @@ -41,15 +70,22 @@ - logging-loki-querier-http - logging-loki-query-frontend-grpc - logging-loki-query-frontend-http + - logging-view-plugin - openstack-logging - common_file_test_id: "RHOSO-12754" - common_file_list: - - /etc/rsyslog.d/10-telemetry.conf + common_manifest_test_id: "RHOSO-12677" + common_manifest_list: + - "loki-operator 2" + - "loki-helm-operator 1" + common_subscription_test_id: "RHOSO-12678" + common_subscription_nspace: openshift-operators-redhat + common_subscription_list: + - loki-operator tasks: - - name: "Verify logging infrastructure components" + - name: "Run logging project, endpoint, credential, node, pod, service, manifest and subscription tests" ansible.builtin.import_role: name: common + - name: "Verify logging pods are running in openstack" hosts: controller gather_facts: no @@ -82,6 +118,7 @@ common_pod_nspace: openshift-operators-redhat common_pod_list: - loki-operator-controller-manager + tasks: - name: "Verify Pods running" ansible.builtin.import_role: @@ -100,21 +137,23 @@ common_pod_nspace: openshift-logging common_pod_list: - cluster-logging-operator + - collector - logging-loki-compactor - logging-loki-distributor - #- logging-loki-gateway + - logging-loki-gateway - logging-loki-index-gateway - logging-loki-ingester - logging-loki-querier - logging-loki-query-frontend - - collector + - logging-view-plugin ### see JIRA LOG-5431 if pods not running tasks: - - name: "Verify Pods running" + - name: "Verify Pods running" ansible.builtin.import_role: name: common + - name: "Verify logging pods are running in minio-dev" hosts: controller gather_facts: no @@ -122,12 +161,15 @@ environment: KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" PATH: "{{ cifmw_path }}" + + vars: common_pod_test_id: "RHOSO-12674" common_pod_status_str: "Running" common_pod_nspace: minio-dev common_pod_list: - minio + tasks: - name: "Run pod running tests" ansible.builtin.import_role: @@ -146,13 +188,30 @@ common_pod_nspace: openstack common_pod_status_str: "Completed" common_pod_list: - - logging-edpm-deployment-openstack-edpm-ipam + - bootstrap-edpm-deployment-logging + - configure-network-edpm-deployment-logging + - configure-os-edpm-deployment-logging + - download-cache-edpm-deployment-logging + - install-certs-edpm-deployment-logging + - install-os-edpm-deployment-logging + - libvirt-edpm-deployment-logging + - logging-edpm-deployment-logging-openstack-edpm + - neutron-metadata-edpm-deployment-logging + - nova-custom-edpm-deployment + - ovn-edpm-deployment-logging + - reboot-os-edpm-deployment-logging + - repo-setup-edpm-deployment-logging + - run-os-edpm-deployment-logging + - ssh-known-hosts-edpm-deployment-logging + - telemetry-edpm-deployment-logging + - validate-network-edpm-deployment-logging tasks: - name: "Run pods completed tests" ansible.builtin.import_role: name: common -- name: "Verify the crds exist" + +- name: "Verify logging services are running in openstack" hosts: controller gather_facts: no ignore_errors: true @@ -160,13 +219,15 @@ KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" PATH: "{{ cifmw_path }}" vars: - common_crd_test_id: "RHOSO-12670" - common_crd_list: - - alertingrules.loki.grafana.com - - lokistacks.loki.grafana.com - - recordingrules.loki.grafana.com - - rulerconfigs.loki.grafana.com + common_service_test_id: "RHOSO-12749" + common_service_nspace: openstack + common_service_list: + - nova-internal + - nova-metadata-internal + - nova-novncproxy-cell1-public + - nova-public tasks: - - name: "Run the crds tests" + - name: "Run Services tests" ansible.builtin.import_role: name: common + diff --git a/ci/logging_tests_local.yml b/ci/logging_tests_local.yml deleted file mode 100644 index b7e37512..00000000 --- a/ci/logging_tests_local.yml +++ /dev/null @@ -1,288 +0,0 @@ ---- -- name: Prepare Logging Tests - hosts: controller - gather_facts: true - ignore_errors: false -# vars: -# id_rsa_path: "{{ playbook_dir }}/id_rsa.ctlplane" -# environment: -# KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" -# PATH: "{{ cifmw_path }}" - vars_files: - - vars/common.yml - tasks: - - name: Create log dir - ansible.builtin.file: - path: "{{ logs_dir }}/logging_local" - state: directory - mode: "0755" - -# # This needs to be updated; what do we use elsewhere? -# # Elsewhere, we assume that we're already logged in -# - name: "Log into OCP" -# ansible.builtin.shell: -# cmd: | -# oc login -u kubeadmin -p "12345678" https://api.crc.testing:6443 -# failed_when: false -# changed_when: false -# -# # I don't think we need this, Zuul __should__ have taken care of this already -# - name: "Create id rsa file for ctlplane access" -# ansible.builtin.shell: -# cmd: | -# oc extract -n openstack secrets/dataplane-ansible-ssh-private-key-secret --to=- | grep -v "ssh\-rsa" > "{{ id_rsa_path }}" -# register: rsa_results -# failed_when: rsa_results.rc != 0 -# changed_when: false -# -# # (efoley): Once again, I don't think this is necessary; if it's not needed for zuul, because it's already done, but is needed before running this on other systems, then the README should be updated to reflect this; -# # A troubleshooting section can be added too so users can identify when they are missing these configuration steps -# - name: "Change files permissions" -# ansible.builtin.shell: -# cmd: | -# chmod 600 "{{ id_rsa_path }}" -# changed_when: false - -- name: "Verify logging projects, endpoints, credentials, nodes, pods, services, manifests and subscriptions" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - vars: - proj_test_id: "RHOSO-12668" - proj_list: - - openshift-openstack-infra - - openshift - - openstack-operators - - openshift-logging - endpoint_test_id: "RHOSO-12682" - endpoint_list: - - [nova,compute,public] - - [nova,compute,internal] - - [placement,placement,public] - - [placement,placement,internal] - - [swift,object-store,public] - - [swift,object-store,internal] - - [cinderv3,volumev3,public] - - [cinderv3,volumev3,internal] - - [barbican,key-manager,public] - - [barbican,key-manager,internal] - - [keystone,identity,public] - - [keystone,identity,internal] - - [glance,image,public] - - [glance,image,internal] - - [neutron,network,public] - - [neutron,network,internal] - - cred_test_id: "RHOSO-12670" - cred_list: - - alertingrules.loki.grafana.com - - lokistacks.loki.grafana.com - - recordingrules.loki.grafana.com - - rulerconfigs.loki.grafana.com - - node_test_id: "RHOSO-12671" - node_list: - - edpm-compute-0 - - edpm-compute-1 - - crc - - pod_test_id: "RHOS0-12672" - pod_status_str: "Running" - pod_nspace: openstack-operators - pod_list: - - telemetry-operator-controller-manager - - dataplane-operator-controller-manager - - service_test_id: "RHOSO-12675" - service_nspace: openshift-logging - service_list: - - cluster-logging-operator-metrics - - logging-loki-compactor-grpc - - logging-loki-compactor-http - - logging-loki-distributor-grpc - - logging-loki-distributor-http - - logging-loki-gateway-http - - logging-loki-gossip-ring - - logging-loki-index-gateway-grpc - - logging-loki-index-gateway-http - - logging-loki-ingester-grpc - - logging-loki-ingester-http - - logging-loki-querier-grpc - - logging-loki-querier-http - - logging-loki-query-frontend-grpc - - logging-loki-query-frontend-http - - logging-view-plugin - - openstack-logging - manifest_test_id: "RHOSO-12677" - manifest_list: - - "loki-operator 2" - - "loki-helm-operator 1" - subscription_test_id: "RHOSO-12678" - subscription_nspace: openshift-operators-redhat - subscription_list: - - loki-operator - tasks: - - name: "Run logging project, endpoint, credential, node, pod, service, manifest and subscription tests" - ansible.builtin.import_role: - name: common - - -- name: "Verify logging pods are running in openstack" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - vars: - pod_test_id: "RHOSO-12752" - pod_status_str: "Running" - pod_nspace: openstack - pod_list: - - openstackclient - tasks: - - name: "Verify Running Pods" - ansible.builtin.import_role: - name: common - - -- name: "Verify logging pods are running in openshift-operators-redhat" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - vars: - pod_test_id: "RHOSO-12673" - pod_status_str: "Running" - pod_nspace: openshift-operators-redhat - pod_list: - - loki-operator-controller-manager - - tasks: - - name: "Verify Pods running" - ansible.builtin.import_role: - name: common - # vars can be passed here, so we can use the same play for this and the next play. - # vars: - # - - -- name: "Verify logging pods are running in openshift-logging" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - vars: - pod_test_id: "RHOSO-12676" - pod_status_str: "Running" - pod_nspace: openshift-logging - pod_list: - - cluster-logging-operator - - collector - - logging-loki-compactor - - logging-loki-distributor - - logging-loki-gateway - - logging-loki-index-gateway - - logging-loki-ingester - - logging-loki-querier - - logging-loki-query-frontend - - logging-view-plugin - - ### see JIRA LOG-5431 if pods not running - tasks: - - name: "Verify Pods running" - ansible.builtin.import_role: - name: common - - -- name: "Verify logging pods are running in minio-dev" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - - - vars: - pod_test_id: "RHOSO-12674" - pod_status_str: "Running" - pod_nspace: minio-dev - pod_list: - - minio - - tasks: - - name: "Run pod running tests" - ansible.builtin.import_role: - name: common - - -- name: "Verify logging pods have complete status in openstack" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - vars: - pod_test_id: "RHOSO-12679" - pod_nspace: openstack - pod_status_str: "Completed" - pod_list: - - bootstrap-edpm-deployment-logging - - configure-network-edpm-deployment-logging - - configure-os-edpm-deployment-logging - - download-cache-edpm-deployment-logging - - install-certs-edpm-deployment-logging - - install-os-edpm-deployment-logging - - libvirt-edpm-deployment-logging - - logging-edpm-deployment-logging-openstack-edpm - - neutron-metadata-edpm-deployment-logging - - nova-custom-edpm-deployment - - ovn-edpm-deployment-logging - - reboot-os-edpm-deployment-logging - - repo-setup-edpm-deployment-logging - - run-os-edpm-deployment-logging - - ssh-known-hosts-edpm-deployment-logging - - telemetry-edpm-deployment-logging - - validate-network-edpm-deployment-logging - tasks: - - name: "Run pods completed tests" - ansible.builtin.import_role: - name: common - - -- name: "Verify logging services are running in openstack" - hosts: controller - gather_facts: no - ignore_errors: true - environment: - KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}" - PATH: "{{ cifmw_path }}" - vars: - service_test_id: "RHOSO-12749" - service_nspace: openstack - service_list: - - nova-internal - - nova-metadata-internal - - nova-novncproxy-cell1-public - - nova-public - tasks: - - name: "Run Services tests" - ansible.builtin.import_role: - name: common - -- name: Include report result - hosts: controller - gather_facts: true - tasks: - - ansible.builtin.include_tasks: - file: report_result.yml - vars: - test_dir: "{{ logs_dir }}/logging_local"