]> git.proxmox.com Git - ceph.git/blame - patches/0006-Revert-ceph-disk-add-deprecation-warnings-in-favor-o.patch
update sources to v12.2.3
[ceph.git] / patches / 0006-Revert-ceph-disk-add-deprecation-warnings-in-favor-o.patch
CommitLineData
8189da1b
FG
1From 69fa7d657d2b849c7d472a2aa8965fa858bc4fd1 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
3Date: Mon, 4 Dec 2017 10:23:30 +0100
4Subject: [PATCH 6/6] Revert "ceph-disk add deprecation warnings in favor of
5 ceph-volume"
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10This reverts commit b8bf0d047868054135592188c7ebe186181310c5.
11
12Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
13---
14 src/ceph-disk/ceph_disk/main.py | 29 +----------------------------
15 1 file changed, 1 insertion(+), 28 deletions(-)
16
17diff --git a/src/ceph-disk/ceph_disk/main.py b/src/ceph-disk/ceph_disk/main.py
18index 6516750d22..6d1a555ead 100644
19--- a/src/ceph-disk/ceph_disk/main.py
20+++ b/src/ceph-disk/ceph_disk/main.py
21@@ -42,23 +42,12 @@ import pwd
22 import grp
23 import textwrap
24 import glob
25-import warnings
26
27 CEPH_OSD_ONDISK_MAGIC = 'ceph osd volume v026'
28 CEPH_LOCKBOX_ONDISK_MAGIC = 'ceph lockbox volume v001'
29
30 KEY_MANAGEMENT_MODE_V1 = 'ceph-mon v1'
31
32-DEPRECATION_WARNING = """
33-*******************************************************************************
34-This tool is now deprecated in favor of ceph-volume.
35-It is recommended to use ceph-volume for OSD deployments. For details see:
36-
37- http://docs.ceph.com/docs/master/ceph-volume/#migrating
38-
39-*******************************************************************************
40-"""
41-
42 PTYPE = {
43 'regular': {
44 'journal': {
45@@ -5649,8 +5638,6 @@ def make_zap_parser(subparsers):
46
47
48 def main(argv):
49- # Deprecate from the very beginning
50- warnings.warn(DEPRECATION_WARNING)
51 args = parse_args(argv)
52
53 setup_logging(args.verbose, args.log_stdout)
54@@ -5670,20 +5657,10 @@ def main(argv):
55 CEPH_PREF_GROUP = args.setgroup
56
57 if args.verbose:
58- try:
59- args.func(args)
60- except Exception:
61- # warn on any exception when running with verbosity
62- warnings.warn(DEPRECATION_WARNING)
63- # but still raise the original issue
64- raise
65-
66+ args.func(args)
67 else:
68 main_catch(args.func, args)
69
70- # if there aren't any errors, still log again at the very bottom
71- warnings.warn(DEPRECATION_WARNING)
72-
73
74 def setup_logging(verbose, log_stdout):
75 loglevel = logging.WARNING
76@@ -5710,8 +5687,6 @@ def main_catch(func, args):
77 func(args)
78
79 except Error as e:
80- # warn on generic 'error' exceptions
81- warnings.warn(DEPRECATION_WARNING)
82 raise SystemExit(
83 '{prog}: {msg}'.format(
84 prog=args.prog,
85@@ -5720,8 +5695,6 @@ def main_catch(func, args):
86 )
87
88 except CephDiskException as error:
89- # warn on ceph-disk exceptions
90- warnings.warn(DEPRECATION_WARNING)
91 exc_name = error.__class__.__name__
92 raise SystemExit(
93 '{prog} {exc_name}: {msg}'.format(
94--
952.14.2
96