Skip to content

Commit

Permalink
F #6564: Fix ceph monitor quotas (#3042)
Browse files Browse the repository at this point in the history
There are two monitor scripts for Ceph datastores:

- src/tm_mad/ceph/monitor (ds SYSTEM)
- src/datastore_mad/remotes/ceph/monitor (ds IMAGE)

The two have the same logic but the first one had diverted from the
second one slightly, making it unable to handle quotas.  This commit
symlinks them to avoid this happening again in the future, and fixes the
relative paths to ensure they work both from the DS and TM drivers
paths.

Signed-off-by: Guillermo Ramos <[email protected]>
  • Loading branch information
1gramos authored Apr 30, 2024
1 parent 3dfd53d commit b72b507
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 107 deletions.
9 changes: 4 additions & 5 deletions src/datastore_mad/remotes/ceph/monitor
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ fi
. $LIB_LOCATION/sh/scripts_common.sh

DRIVER_PATH=$(dirname $0)
source ${DRIVER_PATH}/../libfs.sh
source ${DRIVER_PATH}/../../datastore/libfs.sh
source ${DRIVER_PATH}/../../etc/datastore/ceph/ceph.conf
source ${DRIVER_PATH}/ceph_utils.sh
source ${DRIVER_PATH}/../../datastore/ceph/ceph_utils.sh

# -------- Get datastore arguments from OpenNebula core ------------

DRV_ACTION=`cat -`
ID=$1

XPATH="${DRIVER_PATH}/../xpath.rb -b $DRV_ACTION"
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb -b $DRV_ACTION"

unset i j XPATH_ELEMENTS

Expand Down Expand Up @@ -89,10 +89,9 @@ MONITOR_DATA=$(ssh_monitor_and_log $HOST "$MONITOR_SCRIPT" 2>&1)
MONITOR_STATUS=$?

if [ "$MONITOR_STATUS" = "0" ]; then
XPATH="${DRIVER_PATH}/../xpath.rb --stdin"
XPATH="${DRIVER_PATH}/../../datastore/xpath.rb --stdin"
echo -e "$(rbd_df_monitor ${MONITOR_DATA} ${POOL_NAME})"
else
echo "$MONITOR_DATA"
exit $MONITOR_STATUS
fi

102 changes: 0 additions & 102 deletions src/tm_mad/ceph/monitor

This file was deleted.

1 change: 1 addition & 0 deletions src/tm_mad/ceph/monitor

0 comments on commit b72b507

Please sign in to comment.