aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDoug Szumski <doug@stackhpc.com>2022-10-14 13:57:12 +0100
committerDoug Szumski <doug@stackhpc.com>2022-11-11 15:48:11 +0000
commitadb8f89a361c5f33b75502d3d099e62f10ca4ae6 (patch)
treebe651540561a6f9be106375eda71edd9f6702ff9 /tests
parenta0fc5c5205fd44d8472d5cff8d1c135553ee2fd7 (diff)
downloadkolla-ansible-adb8f89a361c5f33b75502d3d099e62f10ca4ae6.tar.gz
kolla-ansible-adb8f89a361c5f33b75502d3d099e62f10ca4ae6.zip
Remove support for deploying OpenStack Monasca
Kolla Ansible is switching to OpenSearch and is dropping support for deploying ElasticSearch. This is because the final OSS release of ElasticSearch has exceeded its end of life. Monasca is affected because it uses both Logstash and ElasticSearch. Whilst it may continue to work with OpenSearch, Logstash remains an issue. In the absence of any renewed interest in the project, we remove support for deploying it. This helps to reduce the complexity of log processing configuration in Kolla Ansible, freeing up development time. Change-Id: I6fc7842bcda18e417a3fd21c11e28979a470f1cf
Diffstat (limited to 'tests')
-rwxr-xr-xtests/check-failure.sh6
-rw-r--r--tests/run.yml11
-rwxr-xr-xtests/setup_gate.sh8
-rw-r--r--tests/templates/globals-default.j26
-rw-r--r--tests/templates/inventory.j248
-rwxr-xr-xtests/test-monasca.sh84
6 files changed, 2 insertions, 161 deletions
diff --git a/tests/check-failure.sh b/tests/check-failure.sh
index dbc7bb40e..b62e6ffcc 100755
--- a/tests/check-failure.sh
+++ b/tests/check-failure.sh
@@ -27,12 +27,6 @@ check_failure() {
exit 1;
fi
- # NOTE(mgoddard): monasca-thresh is a one-shot container that exits but
- # remains in place, leaving it with a status of exited. This is harmless.
- if [[ "$failed_containers" = "monasca_thresh" ]]; then
- return
- fi
-
if [[ -n "$failed_containers" ]]; then
exit 1;
fi
diff --git a/tests/run.yml b/tests/run.yml
index 43d37184d..c9e451c43 100644
--- a/tests/run.yml
+++ b/tests/run.yml
@@ -10,7 +10,7 @@
- name: set facts for commonly used variables
vars:
# NOTE(yoctozepto): needed here to use in other facts too
- openstack_core_enabled: "{{ scenario not in ['bifrost', 'mariadb', 'prometheus-efk', 'monasca', 'venus'] }}"
+ openstack_core_enabled: "{{ scenario not in ['bifrost', 'mariadb', 'prometheus-efk', 'venus'] }}"
set_fact:
kolla_inventory_path: "/etc/kolla/inventory"
logs_dir: "/tmp/logs"
@@ -22,7 +22,7 @@
build_image_tag: "change_{{ zuul.change | default('none') }}"
openstack_core_enabled: "{{ openstack_core_enabled }}"
openstack_core_tested: "{{ scenario in ['core', 'cephadm', 'zun', 'cells', 'swift', 'ovn'] }}"
- dashboard_enabled: "{{ openstack_core_enabled or scenario in ['monasca'] }}"
+ dashboard_enabled: "{{ openstack_core_enabled }}"
upper_constraints_file: "{{ ansible_env.HOME }}/src/opendev.org/openstack/requirements/upper-constraints.txt"
docker_image_tag_suffix: "{{ '-aarch64' if ansible_architecture == 'aarch64' else '' }}"
kolla_ansible_venv_path: "{{ ansible_env.HOME }}/kolla-ansible-venv"
@@ -485,13 +485,6 @@
chdir: "{{ kolla_ansible_src_dir }}"
when: scenario == "octavia"
- - name: Run test-monasca.sh script
- script:
- cmd: test-monasca.sh
- executable: /bin/bash
- chdir: "{{ kolla_ansible_src_dir }}"
- when: scenario == "monasca"
-
- name: Run test-masakari.sh script
script:
cmd: test-masakari.sh
diff --git a/tests/setup_gate.sh b/tests/setup_gate.sh
index 5886c61d0..af70d4e62 100755
--- a/tests/setup_gate.sh
+++ b/tests/setup_gate.sh
@@ -29,9 +29,6 @@ function setup_openstack_clients {
if [[ $SCENARIO == scenario_nfv ]]; then
packages+=(python-tackerclient python-barbicanclient python-mistralclient)
fi
- if [[ $SCENARIO == monasca ]]; then
- packages+=(python-monascaclient)
- fi
if [[ $SCENARIO == ovn ]]; then
packages+=(python-octaviaclient)
fi
@@ -101,11 +98,6 @@ function prepare_images {
GATE_IMAGES="^cron,^elasticsearch,^fluentd,^grafana,^haproxy,^keepalived,^kibana,^kolla-toolbox,^mariadb,^memcached,^prometheus,^rabbitmq"
fi
- if [[ $SCENARIO == "monasca" ]]; then
- # FIXME(mgoddard): No need for OpenStack core images.
- GATE_IMAGES+=",^elasticsearch,^grafana,^influxdb,^kafka,^kibana,^logstash,^monasca,^storm,^zookeeper"
- fi
-
if [[ $SCENARIO == "venus" ]]; then
GATE_IMAGES="^cron,^elasticsearch,^fluentd,^haproxy,^keepalived,^keystone,^kolla-toolbox,^mariadb,^memcached,^rabbitmq,^venus"
fi
diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2
index c06c8a022..5d8a13a3c 100644
--- a/tests/templates/globals-default.j2
+++ b/tests/templates/globals-default.j2
@@ -173,12 +173,6 @@ enable_magnum: "yes"
enable_trove: "yes"
{% endif %}
-{% if scenario == "monasca" %}
-enable_keystone: "yes"
-enable_monasca: "yes"
-enable_rabbitmq: "no"
-{% endif %}
-
{% if scenario == "octavia" %}
enable_octavia: "yes"
# NOTE(wuchunyang): work around for qemu-kvm 5.1 can not attach second NIC.
diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2
index bd8b50ca8..32af69fe2 100644
--- a/tests/templates/inventory.j2
+++ b/tests/templates/inventory.j2
@@ -10,10 +10,6 @@
{% for host in hostvars if host in ['primary'] %}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }}
{% endfor %}
-{% elif scenario == 'monasca' %}
-{% for host in hostvars if host in ['primary', 'secondary1', 'secondary2'] %}
-{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }}
-{% endfor %}
{% else %}
{% for host in hostvars %}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }}
@@ -46,15 +42,9 @@ control
{% endfor %}
[monitoring]
-{% if scenario == 'monasca' %}
-{% for host in hostvars if host in ['secondary3', 'secondary4', 'secondary5'] %}
-{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }}
-{% endfor %}
-{% else %}
{% for host in hostvars %}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }}
{% endfor %}
-{% endif %}
[deployment]
{% for host in hostvars %}
@@ -158,16 +148,6 @@ control
[outward-rabbitmq:children]
control
-[monasca-agent:children]
-compute
-control
-monitoring
-network
-storage
-
-[monasca:children]
-monitoring
-
[storm:children]
monitoring
@@ -462,34 +442,6 @@ murano
[murano-engine:children]
murano
-# Monasca
-[monasca-agent-collector:children]
-monasca-agent
-
-[monasca-agent-forwarder:children]
-monasca-agent
-
-[monasca-agent-statsd:children]
-monasca-agent
-
-[monasca-api:children]
-monasca
-
-[monasca-log-persister:children]
-monasca
-
-[monasca-log-metrics:children]
-monasca
-
-[monasca-thresh:children]
-monasca
-
-[monasca-notification:children]
-monasca
-
-[monasca-persister:children]
-monasca
-
# Storm
[storm-worker:children]
storm
diff --git a/tests/test-monasca.sh b/tests/test-monasca.sh
deleted file mode 100755
index 646084a50..000000000
--- a/tests/test-monasca.sh
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/bin/bash
-
-set -o xtrace
-set -o errexit
-set -o nounset
-set -o pipefail
-
-function test_monasca_metrics {
- # Check that the monitoring endpoints are registered
- openstack endpoint list -f value --service monitoring --interface internal -c URL
- openstack endpoint list -f value --service monitoring --interface public -c URL
-
- # Run some CLI commands
- MONASCA_PROJECT_ID=$(openstack project list --user monasca-agent -f value -c ID)
- monasca metric-list --tenant-id "$MONASCA_PROJECT_ID"
- monasca alarm-list
- monasca notification-list
-
- # Test the metric pipeline by waiting for some metrics to arrive from the
- # Monasca Agent. If the metric doesn't yet exist, nothing is returned.
- METRIC_STATS_CMD="monasca metric-statistics mem.free_mb --tenant-id $MONASCA_PROJECT_ID COUNT -300 --merge_metrics"
- for i in {1..60}; do
- if [[ $($METRIC_STATS_CMD) == *'mem.free_mb'* ]]; then
- return 0
- fi
- sleep 1
- done
- return 1
-}
-
-function test_monasca_logs {
- # Check that the logging endpoints are registered
- openstack endpoint list -f value --service logging --interface internal -c URL
- openstack endpoint list -f value --service logging --interface public -c URL
-
- # Test the logging pipeline by waiting for some logs to arrive from
- # Fluentd into the Monasca Elasticsearch index
- # TODO: Use index name set in config
-
- # NOTE(dszumski): When querying logs via the Monasca Log API *is*
- # supported, we can replace this in favour of calling querying the Log API.
- ELASTICSEARCH_URL=${OS_AUTH_URL%:*}:9200
- for i in {1..60}; do
- if [[ $(curl -s -X GET $ELASTICSEARCH_URL/_cat/indices?v) == *"monasca-"* ]]; then
- return 0
- fi
- sleep 1
- done
- return 1
-}
-
-function test_monasca_logged {
- . /etc/kolla/admin-openrc.sh
- # Activate virtualenv to access Monasca client
- . ~/openstackclient-venv/bin/activate
-
- test_monasca_metrics
- result=$?
- if [[ $result != 0 ]]; then
- echo "Failed testing metrics pipeline"
- return $result
- fi
-
- test_monasca_logs
- result=$?
- if [[ $result != 0 ]]; then
- echo "Failed testing logging pipeline"
- return $result
- fi
-}
-
-function test_monasca {
- echo "Testing Monasca"
- test_monasca_logged > /tmp/logs/ansible/test-monasca 2>&1
- result=$?
- if [[ $result != 0 ]]; then
- echo "Monasca test failed. See ansible/test-monasca for details"
- else
- echo "Successfully tested Monasca. See ansible/test-monasca for details"
- fi
- return $result
-}
-
-test_monasca