]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-backport.sh: add deprecation warning 34125/head
authorNathan Cutler <ncutler@suse.com>
Mon, 7 Oct 2019 10:49:33 +0000 (12:49 +0200)
committerNathan Cutler <ncutler@suse.com>
Mon, 23 Mar 2020 15:59:13 +0000 (16:59 +0100)
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 <ncutler@suse.com>
(manual cherry pick of commit 365a93bd3fe62369d33d07993dd246e9b4dd63fd)

Conflicts:
    src/script/ceph-backport.sh

src/script/ceph-backport.sh

index 25a3f71a3416d5d415722920cc27d6423a1eb074..6162096ffbc4671b111eab0ac9b3f513881fb362 100755 (executable)
@@ -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