From e9aa9fc29ec35bc4e896f081b93eea701475e47b Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Mon, 7 Oct 2019 12:49:33 +0200 Subject: [PATCH] ceph-backport.sh: add deprecation warning The script is not maintained in the stable versions of Ceph. This commit is not a cherry-pick from master, because the script is maintained in master. It is unmaintained only in the stable versions, like "octopus". Fixes: https://tracker.ceph.com/issues/42194 Signed-off-by: Nathan Cutler (manual cherry pick of commit 365a93bd3fe62369d33d07993dd246e9b4dd63fd) Conflicts: src/script/ceph-backport.sh --- src/script/ceph-backport.sh | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/script/ceph-backport.sh b/src/script/ceph-backport.sh index 25a3f71a3416..6162096ffbc4 100755 --- a/src/script/ceph-backport.sh +++ b/src/script/ceph-backport.sh @@ -347,8 +347,22 @@ function debug { log debug "$@" } +function deprecation_warning { + echo "*******************" + echo "DEPRECATION WARNING" + echo "*******************" + echo + echo "This is an outdated, unmaintained version of ceph-backport.sh. Using this" + echo "version can have unpredictable results. It is recommended to use the" + echo "version from the \"master\" branch, instead. In other words, use this:" + echo + echo "https://github.com/ceph/ceph/blob/master/src/script/ceph-backport.sh" + echo +} + function display_version_message_and_exit { - echo "$this_script: Ceph backporting script, version $SCRIPT_VERSION" + deprecation_warning + echo "$this_script: Ceph backporting script, version $SCRIPT_VERSION (DEPRECATED - DO NOT USE)" exit 0 } @@ -1447,6 +1461,10 @@ while true ; do esac done +deprecation_warning +echo "Sleeping for 5 seconds to give you time to hit CTRL-C..." +sleep 5 + if [ "$ADVICE" ] ; then [ "$HELP" ] && usage [ "$USAGE_ADVICE" ] && usage_advice -- 2.47.3