From 02dd0187e9931fda01741b6b2619e53a8ff94d67 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Wed, 14 Jul 2021 14:57:08 -0700 Subject: [PATCH] Remove support for --link-check-limit This was added after 2.27.0 and deprecated before 2.28.0; let's just remove it. Change-Id: Icb17346b70714cc318b216586326cd57ee27150d --- swift/cli/relinker.py | 8 -------- test/unit/cli/test_relinker.py | 4 ---- 2 files changed, 12 deletions(-) diff --git a/swift/cli/relinker.py b/swift/cli/relinker.py index 130184c0b3..b090e333d2 100644 --- a/swift/cli/relinker.py +++ b/swift/cli/relinker.py @@ -784,11 +784,6 @@ def main(args): help='Set log file name. Ignored if using conf_file.') parser.add_argument('--debug', default=False, action='store_true', help='Enable debug mode') - # --link-check-limit is no longer used but allowed on the command line to - # avoid errors after upgrade - parser.add_argument('--link-check-limit', type=non_negative_int, - default=None, dest='link_check_limit', - help=argparse.SUPPRESS) args = parser.parse_args(args) hubs.use_hub(get_hub()) @@ -812,9 +807,6 @@ def main(args): filename=args.logfile) logger = logging.getLogger() - if args.link_check_limit is not None: - logger.warning('--link-check-limit option is ignored, deprecated and ' - 'will be removed in a future version') conf.update({ 'swift_dir': args.swift_dir or conf.get('swift_dir', '/etc/swift'), 'devices': args.devices or conf.get('devices', '/srv/node'), diff --git a/test/unit/cli/test_relinker.py b/test/unit/cli/test_relinker.py index 8499fa95e2..b6bd7e0e14 100644 --- a/test/unit/cli/test_relinker.py +++ b/test/unit/cli/test_relinker.py @@ -582,7 +582,6 @@ class TestRelinker(unittest.TestCase): '--skip-mount-check', '--files-per-second', '2.2', '--policy', '1', '--partition', '123', '--partition', '123', '--partition', '456', - '--link-check-limit', '3', # allowed but ignored '--workers', '2', '--stats-interval', '222', ]) @@ -600,9 +599,6 @@ class TestRelinker(unittest.TestCase): 'recon_cache_path': '/var/cache/swift-foo', 'stats_interval': 222.0, }, mock.ANY, ['sdx'], do_cleanup=False) - self.assertIn('--link-check-limit option is ignored, deprecated and ' - 'will be removed in a future version', - logger.get_lines_for_level('warning')) with mock.patch('swift.cli.relinker.Relinker') as mock_relinker, \ mock.patch('logging.basicConfig') as mock_logging_config: