Merge "Add grenade job"

This commit is contained in:
Zuul
2025-08-06 07:51:34 +00:00
committed by Gerrit Code Review
4 changed files with 138 additions and 0 deletions

View File

@@ -7,6 +7,7 @@
- check-requirements
check:
jobs:
- grenade-aodh
- aodh-tempest-plugin-mysql
- aodh-tempest-plugin-postgresql
- telemetry-dsvm-integration:
@@ -37,6 +38,7 @@
metric_backends: gnocchi
gate:
jobs:
- grenade-aodh
- aodh-tempest-plugin-mysql
- aodh-tempest-plugin-postgresql
- telemetry-dsvm-integration:
@@ -96,3 +98,30 @@
gnocchi: True
sg-core: False
tempest_test_regex: telemetry_tempest_plugin.aodh
- job:
name: grenade-aodh
parent: grenade
voting: false
required-projects:
- openstack/aodh
- openstack/ceilometer
- name: gnocchixyz/gnocchi
override-checkout: stable/4.6
vars:
configure_swap_size: 8192
grenade_devstack_localrc:
shared:
CEILOMETER_BACKEND: gnocchi
devstack_plugins:
ceilometer: https://opendev.org/openstack/ceilometer
aodh: https://opendev.org/openstack/aodh
devstack_services:
ceilometer-acompute: true
ceilometer-acentral: true
ceilometer-aipmi: true
ceilometer-anotification: true
aodh-api: true
aodh-evaluator: true
aodh-listener: true
irrelevant-files: *aodh-irrelevant-files

View File

@@ -0,0 +1,8 @@
register_project_for_upgrade aodh
register_db_to_save aodh
devstack_localrc base enable_plugin aodh https://opendev.org/openstack/aodh
devstack_localrc base enable_service aodh-api aodh-evaluator aodh-listener tempest
devstack_localrc target enable_plugin aodh https://opendev.org/openstack/aodh
devstack_localrc target enable_service aodh-api aodh-evaluator aodh-listener tempest

27
devstack/upgrade/shutdown.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
#
#
set -o errexit
source $GRENADE_DIR/grenaderc
source $GRENADE_DIR/functions
source $BASE_DEVSTACK_DIR/functions
source $BASE_DEVSTACK_DIR/stackrc # needed for status directory
source $BASE_DEVSTACK_DIR/lib/tls
source $BASE_DEVSTACK_DIR/lib/apache
# Locate the aodh plugin and get its functions
AODH_DEVSTACK_DIR=$(dirname $(dirname $0))
source $AODH_DEVSTACK_DIR/plugin.sh
set -o xtrace
stop_aodh
# ensure everything is stopped
SERVICES_DOWN="aodh-api aodh-evaluator aodh-listener"
ensure_services_stopped $SERVICES_DOWN

74
devstack/upgrade/upgrade.sh Executable file
View File

@@ -0,0 +1,74 @@
#!/usr/bin/env bash
# ``upgrade-aodh``
echo "*********************************************************************"
echo "Begin $0"
echo "*********************************************************************"
# Clean up any resources that may be in use
cleanup() {
set +o errexit
echo "*********************************************************************"
echo "ERROR: Abort $0"
echo "*********************************************************************"
# Kill ourselves to signal any calling process
trap 2; kill -2 $$
}
trap cleanup SIGHUP SIGINT SIGTERM
# Keep track of the grenade directory
RUN_DIR=$(cd $(dirname "$0") && pwd)
# Source params
source $GRENADE_DIR/grenaderc
# Import common functions
source $GRENADE_DIR/functions
# This script exits on an error so that errors don't compound and you see
# only the first error that occurred.
set -o errexit
# Upgrade Aodh
# ==================
# Locate aodh devstack plugin, the directory above the
# grenade plugin.
AODH_DEVSTACK_DIR=$(dirname $(dirname $0))
# Get functions from current DevStack
source $TARGET_DEVSTACK_DIR/functions
source $TARGET_DEVSTACK_DIR/stackrc
source $TARGET_DEVSTACK_DIR/lib/apache
# Get aodh functions from devstack plugin
source $AODH_DEVSTACK_DIR/settings
# Print the commands being run so that we can see the command that triggers
# an error.
set -o xtrace
# Install the target aodh
source $AODH_DEVSTACK_DIR/plugin.sh stack install
# calls upgrade-aodh for specific release
upgrade_project aodh $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Migrate the database
# NOTE(chdent): As we evolve BIN_DIR is likely to be defined, but
# currently it is not.
AODH_BIN_DIR=$(get_python_exec_prefix)
$AODH_BIN_DIR/aodh-dbsync --config-file $AODH_CONF || die $LINENO "DB sync error"
# Start Aodh
start_aodh
ensure_services_started aodh-api aodh-evaluator aodh-listener
set +o xtrace
echo "*********************************************************************"
echo "SUCCESS: End $0"
echo "*********************************************************************"