Skip to content

Commit 474a140

Browse files
authored
Merge branch 'master' into alexy_logging
2 parents ce8e96e + 11dc0d0 commit 474a140

File tree

13 files changed

+220
-17
lines changed

13 files changed

+220
-17
lines changed

.zuul.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
override-checkout: main
2929
- name: github.com/openstack-k8s-operators/telemetry-operator
3030
override-checkout: main
31-
irrelevant-files:
31+
irrelevant-files: &irrelevant_files
3232
- .github/.*
3333
- ci/github/.*
3434
- callback_plugins/.*
@@ -63,17 +63,22 @@
6363
override-checkout: main
6464
- name: github.com/openstack-k8s-operators/telemetry-operator
6565
override-checkout: main
66-
irrelevant-files:
67-
- .github/.*
68-
- ci/github/.*
69-
- callback_plugins/.*
70-
- README*
71-
- .*/*.md
66+
irrelevant-files: *irrelevant_files
67+
68+
name: feature-verification-tests-noop
69+
parent: noop
70+
description: |
71+
A job that always passes. Runs when there's a change to jobs that don't
72+
need full zuul to run but still need to report a pass.
73+
run:
74+
- ci/noop.yml
75+
files: *irrelevant_files
7276

7377
- project:
7478
name: infrawatch/feature-verification-tests
7579
github-check:
7680
jobs:
81+
- feature-verification-tests-noop
7782
- openstack-k8s-operators-content-provider:
7883
override-checkout: main
7984
- functional-tests-on-osp18

ci/github/test_logger.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@
3636
when: true
3737
fail:
3838
msg: "If the task fails, the status will be reported since there's a test ID."
39+
40+
- name: "Set the name based on a var input"
41+
set_fact:
42+
testid: "RHOSO-1234"
43+
- name: "run test with variable name - {{ testid }}"
44+
debug: msg="test"

ci/github/test_logger_expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ RHELOSP-042=passed
66
RHELOSP-043=passed
77
RHELOSP-054=passed
88
RHOSO-078=failed
9+
RHOSO-1234=passed

ci/noop.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- hosts: localhost
3+
tasks:
4+
- ansible.builtin.debug:
5+
msg: "Do nothing"

ci/run_playbooks.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
tags:
6868
- setup
6969

70-
- name: Run telemetry tests on OSP18
71-
block:
7270
- name: "Run telemetry tests playbook locally on the target host"
7371
ansible.builtin.shell:
7472
cmd: |
@@ -80,13 +78,12 @@
8078
ansible.builtin.copy:
8179
content: "{{ output.stdout }}"
8280
dest: "{{ logs_dir }}/ansible_run.log"
83-
84-
85-
- name: Revert the version update
86-
ansible.builtin.shell:
87-
cmd: |
88-
oc patch openstackversions controlplane --type json -p='[{"op": "replace", "path": "/spec/customContainerImages", "value": {} }]'
89-
when: "{{ patch_openstackversions | bool }}"
81+
always:
82+
- name: Revert the version update
83+
ansible.builtin.shell:
84+
cmd: |
85+
oc patch openstackversions controlplane --type json -p='[{"op": "replace", "path": "/spec/customContainerImages", "value": {} }]'
86+
when: "{{ patch_openstackversions | bool }}"
9087

9188
- name: Include report result
9289
ansible.builtin.include_tasks:

roles/telemetry_autoscaling/README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,29 @@ Requirements
77
------------
88
The following resources are required in the OpenStack cloud
99
* network called public
10-
* network called provate
10+
* network called private
1111
* security group called basic with ssh and tcp enabled to the VMs
1212
* a flavor called m1.small
1313
* an image called cirros
1414

15+
Tests:
16+
------
17+
Verify overcloud deployment for autoscaling
18+
Test service API endpoints
19+
Verify all the services are running on overcloud
20+
Verify time-series database service is available
21+
Using the heat service for autoscaling
22+
Create an archive policy
23+
Configure heat template for automatically scaling instances
24+
Create the deployment template for heat to control instance scaling
25+
Create stack deployment for autoscaling
26+
Verify that the stack and resources are created
27+
Verify that the alarms were created for the stack
28+
Verify the deployment and metric resources exist for the stack
29+
Testing and troubleshooting autoscaling
30+
Verify that alarms are triggered with traffic
31+
Verify that Orchestration service has scaled the instances
32+
1533
Role Variables
1634
--------------
1735

roles/telemetry_autoscaling/tasks/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
include_vars: "{{ item }}"
1111
with_items: "{{ vars_files }}"
1212

13+
- name: RHOSO-12666 Test services are enabled for autoscaling
14+
when: metrics_backend == "prometheus"
15+
ansible.builtin.include_tasks:
16+
file: test_services.yml
17+
tags: precheck
18+
1319
- name: Check pre-reqs for autoscaling
1420
ansible.builtin.include_tasks:
1521
file: verify_autoscaling.yml
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
# Verify Orchestration (heat) and telemetry services resources are ready for autoscaling
3+
4+
- name: Verify that custom resource HEAT is ready
5+
ansible.builtin.command:
6+
cmd: |
7+
oc get heat heat -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}{"\n"}'
8+
register: result
9+
failed_when:
10+
- result.stdout != "True"
11+
12+
- name: Verify that custom resource CEILOMETER is ready
13+
ansible.builtin.command:
14+
cmd: |
15+
oc get ceilometer ceilometer -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}{"\n"}'
16+
register: result
17+
failed_when:
18+
- result.stdout != "True"
19+
20+
# - name: Verify that custom resource AUTOSCALING is ready
21+
# It is returning an unexpected response and needs further debugging. will raise another PR to inspect this
22+
# ansible.builtin.command:
23+
# cmd: |
24+
# oc get autoscaling autoscaling -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}{"\n"}'
25+
# register: result
26+
# failed_when:
27+
# - result.stdout != "True"
28+
29+
- name: Verify that custom resource METRICSTORAGE is ready
30+
ansible.builtin.command:
31+
cmd: |
32+
oc get metricstorage metric-storage -o jsonpath='{.status.conditions[?(@.type=="Ready")].status}{"\n"}'
33+
register: result
34+
failed_when:
35+
- result.stdout != "True"

roles/telemetry_autoscaling/tasks/verify_autoscaling.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,12 @@
4040
{{ openstack_cmd }} metric status --fit-width;
4141
register: result
4242
failed_when: result.rc >= 1
43+
44+
# This works when using prometheus as the metrics backend
45+
- name: Verify that PROMETHEUS is enabled
46+
when: metrics_backend == "prometheus"
47+
ansible.builtin.shell: |
48+
{{ openstack_cmd }} metric query up --disable-rbac -c container -c value |grep -i "prometheus" |awk '{print $4}'
49+
register: result
50+
failed_when:
51+
- result.stdout != "0"

roles/telemetry_logging/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
telemetry_logging
2+
=========
3+
4+
Test logging in Openstack
5+
6+
Requirements
7+
------------
8+
9+
Role Variables
10+
--------------
11+
12+
For journal_tests.yml
13+
14+
identifiers_test_id
15+
- polarion id for test
16+
identifiers_list
17+
- Lists identifier strings to look for in the journalctl of the compute nodes
18+
19+
20+
Dependencies
21+
------------
22+
23+
Openstack on Openshift deployed and logging enabled for Openstack
24+
25+
Example Playbook
26+
----------------
27+
28+
Each tasks/playbook.yml should be called independently via "ansible.builtin.import_role" with appropriate vars passed:
29+
30+
- name: "Verify logging journalctl identifiers"
31+
hosts: computes
32+
gather_facts: no
33+
vars:
34+
identifiers_test_id: "RHOSO-12681"
35+
identifiers_list:
36+
- ceilometer_agent_compute
37+
- nova_compute
38+
39+
tasks:
40+
- name: "Verify journalctl logging identifiers"
41+
ansible.builtin.import_role:
42+
name: telemetry_logging
43+
44+
45+
License
46+
-------
47+
48+
Apache 2
49+
50+
Author Information
51+
------------------
52+
53+
An optional section for the role authors to include contact information, or a website (HTML is not allowed).

0 commit comments

Comments
 (0)