Skip to content

Commit

Permalink
Fix aodh test
Browse files Browse the repository at this point in the history
Signed-off-by: Fabricio Aguiar <fabricio.aguiar@gmail.com>
  • Loading branch information
fao89 committed Oct 24, 2024
1 parent b3f3745 commit c62c4d5
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 45 deletions.
36 changes: 25 additions & 11 deletions ci/tempest/ci_fw_vars.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
---
# note by default the source for the playbook specified
# in the hooks is relative to
# https://github.com/openstack-k8s-operators/ci-framework/tree/main/hooks/playbooks
# if you want to use a different source you can use the full path on the ansible controller

post_ctlplane_deploy:
- name: 71 Kustomize control plane to enable heat service
cifmw_edpm_prepare_timeout: 60
pre_deploy_create_coo_subscription:
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/heat-operator'].src_dir }}/ci/tempest/create-coo-subscription-playbook.yaml"
type: playbook
source: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/heat-operator'].src_dir }}/ci/tempest/control_plane_hook.yaml"
- name: 82 Kustomize and update Control Plane
type: playbook
source: control_plane_kustomize_deploy.yml
cifmw_edpm_prepare_kustomizations:
- apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: openstack
patches:
- patch: |-
apiVersion: core.openstack.org/v1beta1
kind: OpenStackControlPlane
metadata:
name: unused
spec:
heat:
enabled: true
telemetry:
enabled: true
template:
metricStorage:
enabled: true
autoscaling:
enabled: true
target:
kind: OpenStackControlPlane
26 changes: 0 additions & 26 deletions ci/tempest/control_plane_hook.yaml

This file was deleted.

10 changes: 10 additions & 0 deletions ci/tempest/create-coo-subscription-playbook.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: "Create the cluster-observability-operator subscription"
hosts: "{{ cifmw_target_hook_host | default('localhost') }}"
gather_facts: false
environment:
KUBECONFIG: "{{ cifmw_openshift_kubeconfig }}"
PATH: "{{ cifmw_path }}"
tasks:
- name: Import tasks for creating COO subscription
ansible.builtin.include_tasks: "create-coo-subscription.yaml"
33 changes: 33 additions & 0 deletions ci/tempest/create-coo-subscription.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- name: Create the COO subscription
ansible.builtin.shell:
cmd: |
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: cluster-observability-operator
namespace: openshift-operators
spec:
channel: development
installPlanApproval: Automatic
name: cluster-observability-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
register: output

# need to have a wait here, since the csv is not created immediately. There is a slight delay, during which time, the oc wait command would fail, since there's no resource to watch
- name: Wait for the required resource to be created
ansible.builtin.command:
cmd:
oc get csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
delay: 10
retries: 20
register: output
until: output.stdout_lines | length != 0

- name: Wait for the resources to be available
ansible.builtin.command:
cmd: |
oc wait --timeout=300s --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
18 changes: 10 additions & 8 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,18 @@
validation.run_validation true
identity.v3_endpoint_type public
identity.v2_admin_endpoint_type public
heat_plugin.vm_to_heat_api_insecure true
heat_plugin.dns_servers "192.168.122.80"
service_available.ceilometer true
service_available.sg_core true
service_available.aodh true
telemetry.sg_core_service_url "https://ceilometer-internal.openstack.svc.cluster.local:3000"
telemetry.prometheus_service_url "https://metric-storage-prometheus.openstack.svc.cluster.local:9090"
telemetry.ceilometer_polling_interval 120
telemetry.prometheus_scrape_interval 30
telemetry.alarm_threshold 50000000000
cifmw_test_operator_tempest_include_list: |
heat_tempest_plugin.*
cifmw_test_operator_tempest_exclude_list: |
heat_tempest_plugin.tests.functional.test_os_wait_condition.OSWaitCondition.test_create_stack_with_multi_signal_waitcondition
heat_tempest_plugin.tests.scenario.test_server_cfn_init.CfnInitIntegrationTest.test_server_cfn_init
heat_tempest_plugin.tests.scenario.test_aodh_alarm.AodhAlarmTest.test_alarm
heat_tempest_plugin.tests.scenario.test_base_resources.BasicResourcesTest.test_base_resources_integration
heat_tempest_plugin.tests.scenario.test_server_signal.ServerSignalIntegrationTest.test_server_signal_userdata_format_raw
heat_tempest_plugin.tests.scenario.test_server_signal.ServerSignalIntegrationTest.test_server_signal_userdata_format_software_config
heat_tempest_plugin.tests.scenario.test_server_software_config.SoftwareConfigIntegrationTest.test_server_software_config
external_plugin: "opendev.org/openstack/heat-tempest-plugin"
change_item: "{{ zuul['items'] | selectattr('project.canonical_name', 'equalto', external_plugin) }}"
cifmw_test_operator_tempest_external_plugin: "{{ [] if change_item | length < 1 else [ { 'repository': 'https://' + external_plugin + '.git', 'changeRepository': 'https://review' + external_plugin, 'changeRefspec': [ 'refs/changes', change_item[0].change[-2:], change_item[0].change, change_item[0].patchset ] | join('/') } ] }}"

0 comments on commit c62c4d5

Please sign in to comment.