+++ /dev/null
-#!/bin/bash
-# -*- indent-tabs-mode: nil -*-
-# Copyright DDN 2021
-#
-######################## For Developers only ########################
-# Hotpool configuration scripts are now moved to EMF repo
-# and will be maintained there. The scripts are kept in lustre
-# repo so that hotfixes if installed should not delete the scripts.
-# These scripts will likely be removed from lustre repo after
-# EXA 6.2 release. Any changes to be done in the scripts should be
-# done in the EMF repo and the changes would be ported here.
-#####################################################################
-#
-# Pacemaker Ticket:
-# $FS-hotpool-allocated (controlled by resource $FS-hotpool)
-#
-# Pacemaker Resources:
-# $FS-hotpool (controlls $FS-hotpool-allocated ticket)
-# cl-$FS-client (cloned client mount)
-# lamigo-$FS-MDTXXXX (for each MDT)
-# lpurge-$FS-OSTXXXX (for each OST in fast pool)
-#
-# Files Created
-# /etc/lamigo/$FS-MDTXXXX.conf (for each MDT)
-# /etc/lpurge/$FS/OSTXXXX.conf (for each OST in fast pool)
-# /etc/fstab updated with client mount line
-
-# CONFIGURATION VARIABLES
-
-DEF_LAMIGO_MINAGE=600
-DEF_LPURGE_FREEHI=80
-DEF_LPURGE_FREELO=50
-DEF_FAST_POOL=ddn_ssd
-DEF_SLOW_POOL=ddn_hdd
-DEF_FAST_POOL_SPILL_THRESHOLD_PCT=90
-
-CURR_RA_VER=$(rpm -q --queryformat '%{version}' ddn-es-resource-agents)
-MIN_RA_VER="5.2.7"
-# Sorted versions from MIN to MAX
-SORTED_VERSIONS=($(echo $CURR_RA_VER $MIN_RA_VER | xargs -n1 | sort -V | xargs))
-
-function usage()
-{
- local rc=${1:-0}
- local values=${2:-1}
- echo "Usage: $(basename $0) [-h] [-n] [-m MINAGE -H FREEHI -L FREELO -f FASTPOOL -s SLOWPOOL] [ FILESYSTEM ]"
- echo " Automatically configures Stratagem Hotpools in a existing HA environment"
- echo " -n - No auto-detect value"
- echo " -h - This help message"
- echo " -m - lamigo minimum age"
- echo " -H - lpurge free-hi percent"
- echo " -L - lpurge free-lo percent"
- echo " -f - Fast OST pool"
- echo " -s - Slow OST pool"
- if (( values == 1 )); then
- echo "Values:"
- echo " Filesystem : $FS"
- echo " Fast OST Pool : $FAST_POOL"
- echo " Slow OST Pool : $SLOW_POOL"
- echo " LAmigo MinAge : $LAMIGO_MINAGE"
- echo " LPurge FreeHI : ${LPURGE_FREEHI:-${DEF_LPURGE_FREEHI}}"
- echo " LPurge FreeLO : ${LPURGE_FREELO:-${DEF_LPURGE_FREELO}}"
- fi
- exit $rc
-}
-
-HELP=false
-AUTO=true
-
-while getopts "hm:H:L:f:s:n" opt; do
- case "$opt" in
- m) LAMIGO_MINAGE=$OPTARG ;;
- H) LPURGE_FREEHI=$OPTARG ;;
- L) LPURGE_FREELO=$OPTARG ;;
- f) FAST_POOL=$OPTARG ;;
- s) SLOW_POOL=$OPTARG ;;
- n) AUTO=false ;;
- h) HELP=true ;;
- esac
-done
-shift $((OPTIND-1))
-
-FS=$1
-
-# Location of /lustre/$FS/<SERVER> mounts and /lustre/$FS/client mount
-ROOT=/lustre
-
-function locate_resource() {
- local res=$1
- clush -N --group=ha_heads "crm_resource -QW -r $res 2> /dev/null || true"
-}
-
-function is_valid_percent {
- local p="${1:-}"
- [[ "${p}" =~ ^[[:digit:]]+$ ]] && ((0 <= p && p <= 100))
-}
-
-function is_minage_ok {
- local p="${1:-}"
- [[ "${p}" =~ ^[[:digit:]]+$ ]] && ((p >= 5))
-}
-
-function set_param_p()
-{
- local mgs_host=$(locate_resource mgs)
- local param="$1"
- local value="$2"
- local entry
-
- # lctl --device MGS llog_print params
- # - { index: 2, event: set_param, device: *, parameter: obdfilter.*.access_log_size, value: 1048576 }
- # - { index: 5, event: set_param, device: lustre-*, parameter: lod.lustre-*.pool.ddn_ssd.spill_target, value: ddn_hdd }
-
- if entry=$(ssh "${mgs_host}" lctl --device MGS llog_print params | grep --fixed-strings "parameter: ${param}, "); then
- echo "param '${param}' is already set on ${msg_host}: ${entry}" >&2
- return 0
- fi
-
- echo "setting '${param}' = '${value}' in params log on ${mgs_host}" 2>&1
- ssh "${mgs_host}" lctl set_param -P "${param}=${value}"
-}
-
-if [ -z "$FS" ]; then
- # Try automatic detection
- FS=$(crm_ticket -l|cut -f 1 -d -|grep -v ^lustre$|sort -u)
-
- if [ $(echo "$FS" |wc -w) -ne 1 ]; then
- echo "Error: Unable to determine filesystem automatically"
- usage 22 0
- fi
-fi
-
-if $AUTO && [ ! -f /etc/lamigo/$FS-MDT0000.conf ]; then
- echo "Disabling auto-detection of settings ($FS-MDT0000 config missing)"
- AUTO=false
-fi
-
-MDSHOST=$(locate_resource mdt0000-$FS)
-if [ -z "$MDSHOST" ]; then
- # if FS is not an resident filesystem, mdt0 will not exist for it
- echo Failed to find mdt0 for filesystem: $FS
- exit 5
-fi
-
-# get lpurge options - this gets the first OST from the FAST pool
-if $AUTO; then
- AUTO_FAST_POOL=$(awk -F = '/^src=/{ print $2 }' /etc/lamigo/$FS-MDT0000.conf)
- AUTO_SLOW_POOL=$(awk -F = '/^tgt=/{ print $2 }' /etc/lamigo/$FS-MDT0000.conf)
- AUTO_LAMIGO_MINAGE=$(awk -F = '/^min-age=/{ print $2 }' /etc/lamigo/$FS-MDT0000.conf)
-fi
-
-# Set value: if not explicitly set, set auto, if no auto, set default
-: ${FAST_POOL:=${AUTO_FAST_POOL:-${DEF_FAST_POOL}}}
-: ${FAST_POOL_SPILL_THRESHOLD_PCT:=${DEF_FAST_POOL_SPILL_THRESHOLD_PCT}}
-: ${SLOW_POOL:=${AUTO_SLOW_POOL:-${DEF_SLOW_POOL}}}
-: ${LAMIGO_MINAGE:=${AUTO_LAMIGO_MINAGE:-${DEF_LAMIGO_MINAGE}}}
-
-# List of %04x formated OST indexes
-FAST_OSTLIST=$(ssh $MDSHOST lctl pool_list $FS.$FAST_POOL|sed -ne 's/.*-OST\(....\)_UUID/\1/p')
-if [ -z "$FAST_OSTLIST" ]; then
- echo "Failed to find OSTs in Fast pool ($FS.$FAST_POOL)"
- usage 2
-fi
-
-SLOW_OSTLIST=$(ssh $MDSHOST lctl pool_list $FS.$SLOW_POOL|sed -ne 's/.*-OST\(....\)_UUID/\1/p')
-if [ -z "$SLOW_OSTLIST" ]; then
- echo "Failed to find OSTs in Slow pool ($FS.$SLOW_POOL)"
- usage 2
-fi
-
-if $AUTO; then
- for OST in $FAST_OSTLIST; do
- F=/etc/lpurge/$FS/OST${OST}.conf
- if [ -f $F ]; then
- AUTO_LPURGE_FREEHI=$(awk -F = '/^freehi=/{ print $2 }' $F)
- AUTO_LPURGE_FREELO=$(awk -F = '/^freelo=/{ print $2 }' $F)
- break
- fi
- done
-fi
-
-: ${LPURGE_FREEHI:=${AUTO_LPURGE_FREEHI:-${DEF_LPURGE_FREEHI}}}
-: ${LPURGE_FREELO:=${AUTO_LPURGE_FREELO:-${DEF_LPURGE_FREELO}}}
-
-if ! is_valid_percent "${LPURGE_FREEHI}"; then
- echo "Invalid FREEHI percentage '${LPURGE_FREEHI}'"
- usage 34
-fi
-
-if ! is_valid_percent "${LPURGE_FREELO}"; then
- echo "Invalid FREELO percentage '${LPURGE_FREELO}'"
- usage 34
-fi
-
-if ! is_valid_percent "${FAST_POOL_SPILL_THRESHOLD_PCT}"; then
- echo "Invalid FAST_POOL_SPILL_THRESHOLD_PCT percentage '${FAST_POOL_SPILL_THRESHOLD_PCT}'"
- usage 34
-fi
-
-if ! ((LPURGE_FREELO < LPURGE_FREEHI)); then
- echo "FREELO (${LPURGE_FREELO}) must be less than FREEHI (${LPURGE_FREEHI})"
- usage 34
-fi
-
-if ! is_minage_ok "${LAMIGO_MINAGE}"; then
- echo "MINAGE (${LAMIGO_MINAGE}) must be positive integer >= 5"
- usage 34
-fi
-
-if $HELP; then
- usage 0
-fi
-
-echo "Using: $0 -m ${LAMIGO_MINAGE} -H ${LPURGE_FREEHI} -L ${LPURGE_FREELO} -f ${FAST_POOL} -s ${SLOW_POOL} $FS"
-
-OSSLIST=$(es_config_get --option fs_settings.$FS.oss_list)
-
-# Die on errors
-set -e
-
-echo "Configuring OFD access logs and pool spilling"
-set_param_p "obdfilter.${FS}-*.access_log_size" "1048576"
-set_param_p "lod.${FS}-*.pool.${FAST_POOL}.spill_target" "${SLOW_POOL}"
-set_param_p "lod.${FS}-*.pool.${FAST_POOL}.spill_threshold_pct" "${FAST_POOL_SPILL_THRESHOLD_PCT}"
-
-MOUNTSPEC=$(/opt/ddn/es/tools/mount_lustre_client --dry-run --fs $FS |awk '{ print $4 }')
-
-echo "Creating config directories"
-clush -Sa mkdir -p /etc/lpurge/$FS/ /etc/lamigo/ $ROOT/$FS/client
-
-# Create client mount if it doesn't exist
-if ! crm_resource -QW -r cl-$FS-client > /dev/null 2>&1; then
-
- echo "Creating lustre client resource agent"
- clush -Sg ha_heads crm configure <<EOF
-primitive $FS-client ocf:ddn:lustre-client meta target-role=Stopped params filesystem=$FS op start timeout=900s op monitor interval=60s op stop timeout=900s
-clone cl-$FS-client $FS-client
-rsc_ticket ticket-$FS-allocated-client $FS-allocated: cl-$FS-client loss-policy=stop
-EOF
-
- # create order constraint for client on all lustre-server template types (mdt or ost)
- clush -Sg ha_heads "cibadmin -e --query --xpath '//template[@type=\"lustre-server\"]'|awk -F \"'\" '/lustre-$FS-/{ print \$2 }'|awk -F - '{ print \"order $FS-client-after-\"\$3\" 0: lustre-$FS-\"\$3\":start cl-$FS-client:start\" }'|crm configure"
-
- ssh $MDSHOST crm configure <<EOF
-order $FS-client-after-mgs 0: mgs:start cl-$FS-client:start
-EOF
-
-fi # ! crm_resource client
-
-# ticket
-echo "Creating Hotpool ticket for $FS"
-clush -Sg ha_heads crm configure <<EOF
-primitive $FS-hotpool ocf:ddn:Ticketer params name=$FS-hotpool-allocated meta allow-migrate=true priority=199 target-role=Stopped op start interval=0 timeout=30 op monitor interval=30 timeout=30 op stop interval=0 timeout=30
-order $FS-hotpool-after-cl-$FS-client inf: cl-$FS-client $FS-hotpool
-EOF
-
-echo "Setting up lpurge (HI:$LPURGE_FREEHI to LO:$LPURGE_FREELO)"
-
-# this results in MDTLIST being a list of MDT indexes in format "%04d"
-# This format is problematic for values greater than 0007, since by
-# default bash will interpret it as octal
-MDTLIST=$(clush -qSN -g ha_heads crm_resource --list-raw|sed -ne "s/^mdt\(.*\)-$FS$/\1/p")
-
-for OST in $FAST_OSTLIST; do
- INDEX=$(printf "%04d" 0x$OST)
- echo Creating lpurge config for $FS-OST$OST
- cat << EOF > /etc/lpurge/$FS/OST$OST.conf
-device=$FS-OST$OST
-# % of free space when lpurge starts looking for objects to purge
-freelo=${LPURGE_FREELO}
-# % of free space when lpurge stops looking for objects to purge
-freehi=${LPURGE_FREEHI}
-# max SSH sessions to each MDT
-max_jobs=8
-scan_threads=1
-pool=$FAST_POOL
-mount=$ROOT/$FS/client
-scan_rate=10000
-EOF
-
- for MDT in $MDTLIST; do
- MDSHOST=$(locate_resource mdt$MDT-$FS)
- echo "mds=$((10#$MDT)):$MDSHOST:$ROOT/$FS/client" >> /etc/lpurge/$FS/OST$OST.conf
- done
- clush -Sca /etc/lpurge/$FS/OST$OST.conf
-
- echo Creating lpurge resource for $FS-OST$OST
- clush -qS --group=ha_heads "crm_resource -QW -r ost$INDEX-$FS >/dev/null 2>&1 && crm configure << EOF || true
-primitive lpurge-$FS-OST$OST systemd:lpurge@$FS-OST$OST.service op monitor interval=30s op start timeout=100s op stop timeout=100s
-order lpurge-$FS-$OST-after-ost ost$INDEX-$FS lpurge-$FS-OST$OST
-rsc_ticket ticket-$FS-hotpool-allocated-lpurge-$FS-OST$OST $FS-hotpool-allocated: lpurge-$FS-OST$OST loss-policy=stop
-EOF"
-
-if [[ "${SORTED_VERSIONS[0]}" == "$MIN_RA_VER" ]]; then
- clush -qS --group=ha_heads "crm_resource -QW -r ost$INDEX-$FS >/dev/null 2>&1 && crm configure << EOF || true
-location hot-pools-prefer-recovered-$FS-OST$OST lpurge-$FS-OST$OST \
- rule -inf: not_defined OST$OST-$FS-recovered or OST$OST-$FS-recovered eq false
-EOF"
-else
- clush -qS --group=ha_heads "crm_resource -QW -r ost$INDEX-$FS >/dev/null 2>&1 && crm configure << EOF || true
-colocation lpurge-$FS-$OST-with-ost inf: lpurge-$FS-OST$OST ost$INDEX-$FS
-EOF"
-fi
-done
-
-echo "Setting up lamigo (From $FAST_POOL to $SLOW_POOL aged at least $LAMIGO_MINAGE)"
-
-# MDTLIST is derived from resources so it's already in decimal but formatted %04d
-for INDEX in $MDTLIST; do
- MDT=$(printf "%s-MDT%04x" $FS $((10#$INDEX)))
- MDTATTR=$(printf "MDT%04x-%s-recovered" $((10#$INDEX)) $FS )
- MDSHOST=$(locate_resource mdt$INDEX-$FS)
- CL=""
-
- # Reuse any existing changelog user. If none was found then lamigo
- # will register a new user with the mask it needs.
- if [[ -f /etc/lamigo/$MDT.conf ]]; then
- CL=$(awk -F = '/^user=/{ print $2 }' /etc/lamigo/$MDT.conf)
- fi
-
- if [[ -z "$CL" ]]; then
- CL=$(ssh $MDSHOST cat /var/lib/lamigo-$MDT.chlg || true)
- fi
-
- if [[ -n "$CL" ]]; then
- # Ensure that the changelog user we found still exists.
- if ssh $MDSHOST lctl get_param -n mdd.$MDT.changelog_users | grep "$CL[[:space:]]"; then
- echo "Reusing changelog user '$CL' for $MDT"
- else
- CL=""
- fi
- fi
-
- echo Creating lamigo config for $MDT
- (
- cat << EOF
-mdt=$MDT
-mount=$ROOT/$FS/client
-min-age=$LAMIGO_MINAGE
-src=$FAST_POOL
-tgt=$SLOW_POOL
-EOF
-
- if [[ -n "$CL" ]]; then
- echo user=$CL
- fi
-
- for HOST in $OSSLIST; do
- echo oss=$HOST
- done
-
- for HOST in $(cluset -e @all); do
- echo agent=$HOST:$ROOT/$FS/client:4
- done
- ) > /etc/lamigo/$MDT.conf
-
- clush -Sa mkdir -p /etc/systemd/system/lamigo@$MDT.service.d/
- cat <<EOF > /etc/systemd/system/lamigo@$MDT.service.d/override.conf
-[Unit]
-After=lustre-$FS-client.mount
-EOF
-
- clush -Sca /etc/lamigo/$MDT.conf /etc/systemd/system/lamigo@$MDT.service.d/override.conf
-
- echo Creating lamigo resource for $MDT
- clush -qS --group=ha_heads "crm_resource -QW -r mdt$INDEX-$FS >/dev/null 2>&1 && crm configure << EOF || true
-primitive lamigo-$MDT systemd:lamigo@$MDT.service op monitor interval=30s op start timeout=15m op stop timeout=120s
-order lamigo-$MDT-after-mdt mdt$INDEX-$FS lamigo-$MDT
-rsc_ticket ticket-$FS-hotpool-allocated-lamigo-$MDT $FS-hotpool-allocated: lamigo-$MDT loss-policy=stop
-EOF"
-
-if [[ "${SORTED_VERSIONS[0]}" == "$MIN_RA_VER" ]]; then
- clush -qS --group=ha_heads "crm_resource -QW -r mdt$INDEX-$FS >/dev/null 2>&1 && crm configure << EOF || true
-location hot-pools-prefer-recovered-$MDT lamigo-$MDT \
- rule -inf: not_defined $MDTATTR or $MDTATTR eq false
-EOF"
-else
- clush -qS --group=ha_heads "crm_resource -QW -r mdt$INDEX-$FS >/dev/null 2>&1 && crm configure << EOF || true
-colocation lamigo-$MDT-with-mdt inf: lamigo-$MDT mdt$INDEX-$FS
-EOF"
-fi
-done
-
-echo "Configuration complete. Run the following command to start services:"
-echo " stratagem-hp-start.sh $FS"
+++ /dev/null
-#!/bin/bash
-# Copyright DDN 2020
-# -*- indent-tabs-mode: nil -*-
-#
-######################## For Developers only ########################
-# Hotpool configuration scripts are now moved to EMF repo
-# and will be maintained there. The scripts are kept in lustre
-# repo so that hotfixes if installed should not delete the scripts.
-# These scripts will likely be removed from lustre repo after
-# EXA 6.2 release. Any changes to be done in the scripts should be
-# done in the EMF repo and the changes would be ported here.
-#####################################################################
-
-# Set a default 10+ minute timeout for waitfor()
-TIMEOUT=${TIMEOUT:-600}
-
-NOW=false
-
-FS=$1
-
-function usage {
- echo "Usage: $(basename $0) [-h] [--now] [FILESYSTEM]"
- echo " Stop stratagem hotpools in HA environment"
- echo " --now - Stop mirroring processes and client mounts"
-}
-
-function waitfor {
- local ids=$*
-
- [ -z "$ids" ] && return
-
- echo -n "Waiting for $ids"
-
- local deadline=$((SECONDS + TIMEOUT))
-
- local done=false
- until $done || ((deadline < SECONDS)); do
-
- done=true
- for i in $ids; do
- # This finds the host the resource is active on (empty it is stopped)
- res=$(clush -qg ha_heads crm_resource -QW -r $i 2> /dev/null)
- if [ -n "$res" ]; then
- done=false
- echo -n "."
- sleep 1
- break
- fi
- done
- done
-
- echo ""
-
- if ! $done; then
- echo "Waiting for $ids TIMED OUT!"
- exit 1
- fi
-}
-
-if [ "$FS" = "-h" ] || [ "$FS" = "--help" ]; then
- usage
- exit 0
-
-elif [ "$FS" = "--now" ]; then
- shift
- NOW=true
- FS=$1
-fi
-
-if [ -z "$FS" ]; then
- # Try automatic detection
- FS=$(crm_ticket -l|cut -f 1 -d -|grep -v ^lustre$|uniq)
-
- if [ $(echo "$FS" |wc -w) -ne 1 ]; then
- echo "Error: Could not automatically find filesystem, please specify"
- usage
- exit 1
- fi
-fi
-
-if crm_resource -QW -r $FS-hotpool > /dev/null 2>&1; then
- echo Stopping Hotpools for $FS
- clush -qS --group=ha_heads crm res stop $FS-hotpool
-
- if $NOW; then
- waitfor $FS-hotpool
-
- echo Killing all lfs mirror commands for $FS
- clush -q -g oss,mds,mgs pkill -f ^lfs.mirror
-
- echo Stopping Client mounts for $FS
- clush -qS -g ha_heads crm res stop cl-$FS-client
-
- waitfor cl-$FS-client
- fi
-
-elif clush -Ng ha_heads crm_resource -l|egrep -q "^(lamigo|lpurge)-$FS-"; then
- echo "Stopping old style Hotpools (see stratagem-hp-convert.sh)"
- clush -qS -g ha_heads crm res stop cl-$FS-client
-
- if $NOW; then
- echo Killing all lfs mirror commands for $FS
- clush -q -g oss,mds,mgs pkill -f ^lfs.mirror
- fi
-
-else
- echo "Hotpools not configured"
- echo " Please run: stratagem-hp-config.sh"
- exit 1
-fi
+++ /dev/null
-#!/bin/bash
-# -*- indent-tabs-mode: nil -*-
-# Copyright DDN 2020
-#
-######################## For Developers only ########################
-# Hotpool configuration scripts are now moved to EMF repo
-# and will be maintained there. The scripts are kept in lustre
-# repo so that hotfixes if installed should not delete the scripts.
-# These scripts will likely be removed from lustre repo after
-# EXA 6.2 release. Any changes to be done in the scripts should be
-# done in the EMF repo and the changes would be ported here.
-#####################################################################
-#
-# After stopping hotpools (via ticket)
-# Removes:
-# resources lamigo-$FS-*
-# resources lpurge-$FS-*
-# resource $FS-hotpool
-# ticket $FS-hotpool-allocated
-#
-# Leaves:
-# all lamigo & lpurge config files
-# client mount
-
-FS=$1
-
-# Set a default 10+ minute timeout for waitfor()
-TIMEOUT=${TIMEOUT:-600}
-
-function usage() {
- echo "Usage: $(basename $0) [-h] [-t SECS] [FILESYSTEM]"
- echo " Tear down Stratagem Hotpools HA environment"
- echo " -t SECS - Max timeout to wait for services to stop (default: $TIMEOUT)"
-}
-
-while getopts "ht:" opt; do
- case $opt in
- h) usage; exit 0;;
- t) TIMEOUT=$OPTARG;;
- esac
-done
-
-if [ "$FS" = "--help" ]; then
- usage
- exit 0
-fi
-
-if [ -z "$FS" ]; then
- # Try automatic detection
- FS=$(crm_ticket -l|cut -f 1 -d -|grep -v ^lustre$|uniq)
-
- if [ $(echo "$FS" |wc -w) -ne 1 ]; then
- echo "Usage: $0 FSNAME"
- exit 1
- fi
-fi
-
-waitfor () {
- local ids=$*
-
- [ -z "$ids" ] && return
-
- echo -n "Waiting for $ids"
-
- local deadline=$((SECONDS+TIMEOUT))
-
- local done=false
- until $done || ((deadline < SECONDS)); do
-
- done=true
- for i in $ids; do
- # This finds the host the resource is active on (empty it is stopped)
- res=$(clush -qg ha_heads crm_resource -QW -r $i 2> /dev/null)
- if [ -n "$res" ]; then
- done=false
- echo -n "."
- sleep 1
- break
- fi
- done
- done
-
- echo ""
-
- if ! $done; then
- echo "Waiting for $ids TIMED OUT!"
- exit 1
- fi
-}
-
-if ! crm_resource -QW -r $FS-hotpool > /dev/null 2>&1; then
- if clush -Ng ha_heads crm_resource -l|egrep -q "^(lamigo|lpurge)-$FS-"; then
- echo "Hotpools needs conversion"
- echo " Please run: stratagem-hp-convert.sh"
- exit 1
- else
- echo "Hotpools not configured"
- exit 0
- fi
-fi
-
-echo "Stopping Hotpools for $FS"
-clush -qS --group=ha_heads crm res stop $FS-hotpool
-
-for host in $(cluset -e @ha_heads); do
- IDS=$(ssh $host crm_resource --list-raw|egrep "^(lamigo|lpurge)-$FS-")
- if [ -n "$IDS" ]; then
- echo Stopping lamigo and lpurge on $host
- ssh $host crm res stop $IDS
-
- waitfor $IDS
-
- ssh $host crm config del $IDS
- fi
-done
-
-echo "Removing Hotpool ticket for $FS"
-clush -qS --group=ha_heads crm config del $FS-hotpool
-
-clush -qS --group=ha_heads crm_ticket --ticket $FS-hotpool-allocated --cleanup
-
-echo "Removing Hotpools changelogs for $FS"
-clush -aqS stratagem-hp-deregister-changelogs.sh "$FS"
-
-echo "Local client is still configured"
-echo " to remove run: stratagem-hp-teardown-client.sh"