added: retrieve ceph versions for compatibility checks

This commit is contained in:
2023-08-04 15:54:37 +02:00
parent a6e1f9342a
commit 514d19b9f6

View File

@@ -39,6 +39,8 @@ declare -A -g dvmids
declare -g scluster
declare -g dcluster
declare -g scephversion
declare -g dcephversion
# global integers
declare -g -i perf_freeze_ok=0
@@ -423,6 +425,9 @@ function mirror() {
log info "Start mirror $(date "+%F %T")"
startjob=$(date +%s)
get_ceph_version
log info "Local Ceph Version: $scephversion, Remote Ceph version: $dcephversion"
#create pid file
local pid_file="/var/run/$PROGNAME.pid"
if [[ -e "$pid_file" ]]; then
@@ -883,6 +888,11 @@ function check_pool_exist() {
echo $exists
}
function get_ceph_version() {
scephversion=$(ceph -v | cut -d " " -f 3)
dcephversion=$(ssh $opt_destination ceph -v | cut -d " " -f 3)
}
function main(){
[ $# = 0 ] && usage;