Merge "Remove support for --link-check-limit"
This commit is contained in:
commit
c89ed5afe4
@ -784,11 +784,6 @@ def main(args):
|
|||||||
help='Set log file name. Ignored if using conf_file.')
|
help='Set log file name. Ignored if using conf_file.')
|
||||||
parser.add_argument('--debug', default=False, action='store_true',
|
parser.add_argument('--debug', default=False, action='store_true',
|
||||||
help='Enable debug mode')
|
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)
|
args = parser.parse_args(args)
|
||||||
hubs.use_hub(get_hub())
|
hubs.use_hub(get_hub())
|
||||||
@ -812,9 +807,6 @@ def main(args):
|
|||||||
filename=args.logfile)
|
filename=args.logfile)
|
||||||
logger = logging.getLogger()
|
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({
|
conf.update({
|
||||||
'swift_dir': args.swift_dir or conf.get('swift_dir', '/etc/swift'),
|
'swift_dir': args.swift_dir or conf.get('swift_dir', '/etc/swift'),
|
||||||
'devices': args.devices or conf.get('devices', '/srv/node'),
|
'devices': args.devices or conf.get('devices', '/srv/node'),
|
||||||
|
@ -582,7 +582,6 @@ class TestRelinker(unittest.TestCase):
|
|||||||
'--skip-mount-check', '--files-per-second', '2.2',
|
'--skip-mount-check', '--files-per-second', '2.2',
|
||||||
'--policy', '1', '--partition', '123',
|
'--policy', '1', '--partition', '123',
|
||||||
'--partition', '123', '--partition', '456',
|
'--partition', '123', '--partition', '456',
|
||||||
'--link-check-limit', '3', # allowed but ignored
|
|
||||||
'--workers', '2',
|
'--workers', '2',
|
||||||
'--stats-interval', '222',
|
'--stats-interval', '222',
|
||||||
])
|
])
|
||||||
@ -600,9 +599,6 @@ class TestRelinker(unittest.TestCase):
|
|||||||
'recon_cache_path': '/var/cache/swift-foo',
|
'recon_cache_path': '/var/cache/swift-foo',
|
||||||
'stats_interval': 222.0,
|
'stats_interval': 222.0,
|
||||||
}, mock.ANY, ['sdx'], do_cleanup=False)
|
}, 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, \
|
with mock.patch('swift.cli.relinker.Relinker') as mock_relinker, \
|
||||||
mock.patch('logging.basicConfig') as mock_logging_config:
|
mock.patch('logging.basicConfig') as mock_logging_config:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user