Files
app-rook-ceph/stx-rook-ceph-helm/files/rook-mon-exit.sh
Caio Correa 326f833d3e Initial commit for app-rook-ceph
The app is based on the old StarlingX Rook Ceph application.

This provides support for the latest versions of Rook Ceph
storage and packs it as a StarlingX Application.

Auto-increment helm chart versions is already present on this
initial commit.

Support for Dual-Stack.

Partial IPv6 support was added: there is a bug with DX IPv6
configuration involving the floating monitor.

Remove/delete is successful for FluxCD, however some residual
kubernetes assets remains on the system after the remove.

Rook Ceph version: 1.13.7

Test Plan:
    PASS: build all app-rook-ceph packages successfully.
    PASS: app-rook-ceph upload/apply/remove/delete on
          SX/DX/DX+/Standard platforms.
    PASS: create a volume using PVC through cephfs and rbd
          storageClasses and test read/write on the corresponding
          pools at SX/DX/DX+/Standard plaforms.

Story: 2011066
Task: 49846

Change-Id: I7aa6b08a30676095c86a974eaca79084b2f06859
Signed-off-by: Caio Correa <caio.correa@windriver.com>
2024-05-08 09:51:44 -03:00

81 lines
2.0 KiB
Bash

#!/bin/bash
#
# Copyright (c) 2020 Intel Corporation, Inc.
# Copyright (c) 2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
RETVAL=0
################################################################################
# Start Action
################################################################################
function start {
return
}
################################################################################
# Stop Action
################################################################################
function stop {
pgrep ceph-mon
if [ x"$?" = x"0" ]; then
kubectl --kubeconfig=/etc/kubernetes/admin.conf delete \
deployments.apps -n rook-ceph rook-ceph-mon-a
kubectl --kubeconfig=/etc/kubernetes/admin.conf delete po \
-n rook-ceph --selector="app=rook-ceph-mon,mon=a"
fi
pgrep ceph-osd
if [ x"$?" = x"0" ]; then
kubectl --kubeconfig=/etc/kubernetes/admin.conf delete \
deployments.apps -n rook-ceph \
--selector="app=rook-ceph-osd,failure-domain=$(hostname)"
kubectl --kubeconfig=/etc/kubernetes/admin.conf delete po \
--selector="app=rook-ceph-osd,failure-domain=$(hostname)" \
-n rook-ceph
fi
}
################################################################################
# Status Action
################################################################################
function status {
pgrep sysinv-api
RETVAL=$?
return
}
################################################################################
# Main Entry
################################################################################
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
*)
echo "usage: $0 { start | stop | status | restart }"
exit 1
;;
esac
exit $RETVAL